From 4f5ea47914146c9ab458aff78e015d657e644f1d Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sun, 2 Aug 2009 19:16:14 +0200 Subject: [PATCH] gcc44: hook to the build --- Makefile.inc1 | 18 +++++++++++++----- etc/mtree/BSD.include.dist | 14 ++++++++++++++ etc/mtree/BSD.usr.dist | 8 ++++++++ gnu/lib/Makefile | 2 +- gnu/usr.bin/Makefile | 3 +++ share/mk/Makefile | 1 + share/mk/bsd.cpu.mk | 30 ++++++++++++------------------ 7 files changed, 52 insertions(+), 24 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 6f95ca416e..01c7005906 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -787,6 +787,8 @@ _gcc34_tools= gnu/usr.bin/cc34/cc_prep gnu/usr.bin/cc34/cc_tools .endif _gcc41_cross= gnu/usr.bin/cc41 _gcc41_tools= gnu/usr.bin/cc41/cc_prep gnu/usr.bin/cc41/cc_tools +_gcc44_cross= gnu/usr.bin/cc44 +_gcc44_tools= gnu/usr.bin/cc44/cc_prep gnu/usr.bin/cc44/cc_tools _custom_cross= libexec/customcc _binutils= gnu/usr.bin/binutils217 @@ -797,7 +799,7 @@ _libkrb5= kerberos5/tools kerberos5/lib/libroken kerberos5/lib/libvers \ .endif build-tools: -.for _tool in ${_gcc34_tools} ${_gcc41_tools} ${_libkrb5} ${_share} +.for _tool in ${_gcc34_tools} ${_gcc41_tools} ${_gcc44_tools} ${_libkrb5} ${_share} ${ECHODIR} "===> ${_tool} (build-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ @@ -817,7 +819,7 @@ _btxld= usr.sbin/btxld cross-tools: .for _tool in ${_btxld} ${_binutils} \ usr.bin/objformat \ - ${_gcc34_cross} ${_gcc41_cross} ${_custom_cross} + ${_gcc34_cross} ${_gcc41_cross} ${_gcc44_cross} ${_custom_cross} ${ECHODIR} "===> ${_tool} (cross-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ @@ -852,6 +854,9 @@ libraries: cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc41 \ ${MAKE} -f Makefile.inc1 _startup_libs41; + cd ${.CURDIR}; \ + HOST_CCVER=${HOST_CCVER} CCVER=gcc44 \ + ${MAKE} -f Makefile.inc1 _startup_libs44; cd ${.CURDIR}; \ ${MAKE} -f Makefile.inc1 _startup_libs; \ ${MAKE} -f Makefile.inc1 _prebuild_libs; \ @@ -861,11 +866,12 @@ libraries: # These dependencies are not automatically generated: # # gnu/lib/${CCVER}/libgcc and gnu/lib/${CCVER}/csu must be built before all -# shared libraries for ELF. The target for _startup_libs34 is -# specifically built using gcc34. Same goes for _startup_libs41. +# shared libraries for ELF. The target for _startup_libsXX is +# specifically built using gccXX. # _startup_libs34= gnu/lib/gcc34/csu gnu/lib/gcc34/libgcc _startup_libs41= gnu/lib/gcc41/csu gnu/lib/gcc41/libgcc +_startup_libs44= gnu/lib/gcc44/csu gnu/lib/gcc44/libgcc _startup_libs= lib/csu lib/libc lib/libc_rtld _prebuild_libs= lib/libbz2 lib/libz @@ -904,7 +910,7 @@ _generic_libs+= secure/lib _generic_libs+= usr.bin/lex/lib -.for _lib in ${_startup_libs34} ${_startup_libs41} \ +.for _lib in ${_startup_libs34} ${_startup_libs41} ${_startup_libs44} \ ${_startup_libs} ${_prebuild_libs} ${_generic_libs} ${_lib}__L: .PHONY .if exists(${.CURDIR}/${_lib}) @@ -919,6 +925,7 @@ ${_lib}__L: .PHONY _startup_libs: ${_startup_libs:S/$/__L/} _startup_libs34: ${_startup_libs34:S/$/__L/} _startup_libs41: ${_startup_libs41:S/$/__L/} +_startup_libs44: ${_startup_libs44:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} @@ -927,6 +934,7 @@ _generic_libs: ${_generic_libs:S/$/__L/} # .ORDER: ${_startup_libs34:S/$/__L/} .ORDER: ${_startup_libs41:S/$/__L/} +.ORDER: ${_startup_libs44:S/$/__L/} .ORDER: ${_startup_libs:S/$/__L/} .ORDER: ${_prebuild_libs:S/$/__L/} .ORDER: ${_generic_libs:S/$/__L/} diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index e9d8e575a5..6aa8aa8843 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -135,6 +135,20 @@ tr1 .. .. + 4.4 + backward + .. + bits + .. + debug + .. + ext + .. + tr1 + .. + tr1_impl + .. + .. .. cpu .. diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 2a6106fa7d..2ce1d23eff 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -29,6 +29,10 @@ profile .. .. + gcc44 + profile + .. + .. i18n .. profile @@ -51,6 +55,8 @@ .. gcc41 .. + gcc44 + .. lint .. msdosfs @@ -71,6 +77,8 @@ .. gcc41 .. + gcc44 + .. lpr ru .. diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index b182398773..9745d12120 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: src/gnu/lib/Makefile,v 1.25.2.4 2001/01/06 23:16:53 obrien Exp $ # $DragonFly: src/gnu/lib/Makefile,v 1.17 2008/06/27 08:08:25 corecode Exp $ -SUBDIR= libdialog libregex gcc41 +SUBDIR= libdialog libregex gcc41 gcc44 .if !defined(NO_GCC34) SUBDIR+= gcc34 .endif diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index 3ec89f8589..951054a9c6 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -21,4 +21,7 @@ SUBDIR+= cc34 SUBDIR+= cc41 .ORDER: binutils217 cc41 +SUBDIR+= cc44 +.ORDER: binutils217 cc44 + .include diff --git a/share/mk/Makefile b/share/mk/Makefile index a26ca3b4c6..31b38ea7ed 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -4,6 +4,7 @@ FILES= bsd.README FILES+= bsd.cpu.mk bsd.cpu.gcc34.mk bsd.cpu.gcc41.mk bsd.cpu.custom.mk +FILES+= bsd.cpu.gcc44.mk FILES+= bsd.dep.mk bsd.doc.mk bsd.files.mk bsd.patch.mk FILES+= bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk bsd.hostlib.mk diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index fcad0d78c2..1a453d3558 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -15,30 +15,26 @@ # If the host system does not have the desired compiler for HOST_CCVER # we back off to something it probably does have. -CCVER ?= gcc41 +_DEFAULT_CCVER= gcc41 + +CCVER ?= ${_DEFAULT_CCVER} _CCVER := ${CCVER} -.if ${_CCVER} == "gcc34" || ${_CCVER} == "gcc41" -.if exists(/usr/libexec/${_CCVER}/cc) +.if exists(/usr/libexec/${_CCVER}/cc) || exists(/usr/libexec/custom/cc) HOST_CCVER?= ${_CCVER} .else -HOST_CCVER?= gcc34 -.endif -.else -.if exists(/usr/libexec/custom/cc) -HOST_CCVER?= ${CCVER} -.else -HOST_CCVER?= gcc34 -.endif +HOST_CCVER?= ${_DEFAULT_CCVER} .endif -.if ${CCVER} == "gcc34" -. include -.elif ${CCVER} == "gcc41" -. include -.elif defined(CCVER_BSD_CPU_MK) +.if defined(CCVER_BSD_CPU_MK) . if ${CCVER_BSD_CPU_MK} != "" . include "${CCVER_BSD_CPU_MK}" . endif +.elif ${CCVER} == "gcc34" +. include +.elif ${CCVER} == "gcc41" +. include +.elif ${CCVER} == "gcc44" +. include .else . include .endif @@ -48,10 +44,8 @@ HOST_CCVER?= gcc34 # cross compiling from 4.x or older versions of DFly and should not be set # by the user. # -.if defined(.DIRECTIVE_MAKEENV) .makeenv CCVER .makeenv HOST_CCVER -.endif # We can reassign _CPUCFLAGS and CFLAGS will evaluate properly to the # new value, we do not have to add the variable to CFLAGS twice. -- 2.41.0