From 29d48e653c1aae3bc3264e129fab7230823bc247 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Mon, 5 Sep 2005 15:36:34 +0000 Subject: [PATCH] Add gcc40 build hooks. Gcc40 isn't built per default, you will have to enable it by adding WANT_GCC40=yes to make.conf. --- Makefile.inc1 | 25 +++++++++++++++++++------ etc/defaults/make.conf | 12 +++++++++--- gnu/lib/Makefile | 6 +++++- gnu/usr.bin/Makefile | 7 ++++++- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index fe64c3286c..b258c14a7d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1,6 +1,6 @@ # # $FreeBSD: src/Makefile.inc1,v 1.141.2.62 2003/04/06 19:54:00 dwmalone Exp $ -# $DragonFly: src/Makefile.inc1,v 1.77 2005/08/28 07:06:42 dillon Exp $ +# $DragonFly: src/Makefile.inc1,v 1.78 2005/09/05 15:36:34 corecode Exp $ # # Make command line options: # -DMAKE_KERBEROS5 to build Kerberos5 @@ -811,6 +811,10 @@ _share= share/syscons/scrnmaps _gcc34_cross= gnu/usr.bin/cc34 _gcc34_tools= gnu/usr.bin/cc34/cc_prep gnu/usr.bin/cc34/cc_tools +.if defined(WANT_GCC40) +_gcc40_cross= gnu/usr.bin/cc40 +_gcc40_tools= gnu/usr.bin/cc40/cc_prep gnu/usr.bin/cc40/cc_tools +.endif _binutils= gnu/usr.bin/binutils215 .if !defined(NO_FORTRAN) @@ -828,7 +832,7 @@ _sysinstall= release/sysinstall .endif build-tools: -.for _tool in ${_gcc34_tools} ${_fortran} ${_libkrb5} ${_share} ${_sysinstall} +.for _tool in ${_gcc34_tools} ${_gcc40_tools} ${_fortran} ${_libkrb5} ${_share} ${ECHODIR} "===> ${_tool} (build-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ @@ -848,7 +852,7 @@ _btxld= usr.sbin/btxld cross-tools: .for _tool in ${_btxld} ${_binutils} \ usr.bin/objformat usr.sbin/crunch/crunchide \ - ${_gcc34_cross} + ${_gcc34_cross} ${_gcc40_cross} ${ECHODIR} "===> ${_tool} (cross-tools)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ @@ -877,7 +881,13 @@ hierarchy: libraries: cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc34 \ - ${MAKE} -f Makefile.inc1 _startup_libs34; \ + ${MAKE} -f Makefile.inc1 _startup_libs34; +.if defined(WANT_GCC40) + cd ${.CURDIR}; \ + HOST_CCVER=${HOST_CCVER} CCVER=gcc40 \ + ${MAKE} -f Makefile.inc1 _startup_libs40; +.endif + cd ${.CURDIR}; \ ${MAKE} -f Makefile.inc1 _startup_libs; \ ${MAKE} -f Makefile.inc1 _prebuild_libs; \ ${MAKE} -f Makefile.inc1 _generic_libs; @@ -887,9 +897,10 @@ libraries: # # gnu/lib/${CCVER}/libgcc and lib/csu must be built before all # shared libraries for ELF. The target for _startup_libs34 is -# specifically built using gcc34. +# specifically built using gcc34. Same goes for _startup_libs40. # _startup_libs34= gnu/lib/gcc34/libgcc +_startup_libs40= gnu/lib/gcc40/libgcc _startup_libs= lib/csu/${MACHINE_ARCH} _startup_libs+= lib/csu/common lib/libc lib/libc_rtld @@ -929,7 +940,7 @@ _generic_libs+= secure/lib _generic_libs+= usr.bin/lex/lib -.for _lib in ${_startup_libs2} ${_startup_libs3} ${_startup_libs34} \ +.for _lib in ${_startup_libs34} ${_startup_libs40} \ ${_startup_libs} ${_prebuild_libs} ${_generic_libs} ${_lib}__L: .PHONY .if exists(${.CURDIR}/${_lib}) @@ -943,6 +954,7 @@ ${_lib}__L: .PHONY _startup_libs: ${_startup_libs:S/$/__L/} _startup_libs34: ${_startup_libs34:S/$/__L/} +_startup_libs40: ${_startup_libs40:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} @@ -950,6 +962,7 @@ _generic_libs: ${_generic_libs:S/$/__L/} # races (e.g. generation of tconfig.h) # .ORDER: ${_startup_libs34:S/$/__L/} +.ORDER: ${_startup_libs40:S/$/__L/} .ORDER: ${_startup_libs:S/$/__L/} .ORDER: ${_prebuild_libs:S/$/__L/} .ORDER: ${_generic_libs:S/$/__L/} diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index d865071bd3..9ca33cf5d6 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -1,5 +1,5 @@ # $FreeBSD: src/etc/defaults/make.conf,v 1.97.2.80 2003/02/15 16:34:56 trhodes Exp $ -# $DragonFly: src/etc/defaults/make.conf,v 1.13 2005/06/11 21:09:51 asmodai Exp $ +# $DragonFly: src/etc/defaults/make.conf,v 1.14 2005/09/05 15:36:34 corecode Exp $ # # NOTE: Please would any committer updating this file also update the # make.conf(5) manual page, if necessary, which is located in @@ -42,8 +42,14 @@ # be set in /etc/make.conf and that gcc 3.4 not yet be used to build the boot # blocks, boot loader, or the kernel. # -# CCVER?=gcc2 # (use GCC 2.95.x, default) -# CCVER?=gcc34 # (use GCC 3.4, experimental) +# CCVER?=gcc34 # (use GCC 3.4, default) +# CCVER?=gcc40 # (use GCC 4.0, experimental, only available +# # if WANT_GCC40 set) +# +# +# Build gcc40 with world. This won't make gcc40 the default compiler +# +#WANT_GCC40=yes # # # CFLAGS controls the compiler settings used when compiling C code. diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile index 2270a47502..9294ace2b9 100644 --- a/gnu/lib/Makefile +++ b/gnu/lib/Makefile @@ -1,6 +1,10 @@ # $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.10 2005/06/19 16:18:22 joerg Exp $ +# $DragonFly: src/gnu/lib/Makefile,v 1.11 2005/09/05 15:36:34 corecode Exp $ SUBDIR= libdialog libregex libreadline gcc34 +.if defined(WANT_GCC40) +SUBDIR+= gcc40 +.endif + .include diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index cc9934d0ac..97cef6dc91 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/gnu/usr.bin/Makefile,v 1.51 2000/01/16 00:11:34 obrien Exp $ -# $DragonFly: src/gnu/usr.bin/Makefile,v 1.21 2005/04/22 07:38:58 joerg Exp $ +# $DragonFly: src/gnu/usr.bin/Makefile,v 1.22 2005/09/05 15:36:34 corecode Exp $ # # Note that gcc2 is only built under the i386 architecture. Other # architectures require gcc3. @@ -17,4 +17,9 @@ SUBDIR+=gdb SUBDIR+= binutils215 cc34 .ORDER: binutils215 cc34 +.if defined(WANT_GCC40) +SUBDIR+= binutils215 cc40 +.ORDER: binutils215 cc40 +.endif + .include -- 2.41.0