Add gcc40 build hooks. Gcc40 isn't built per default, you will have to
authorSimon Schubert <corecode@dragonflybsd.org>
Mon, 5 Sep 2005 15:36:34 +0000 (15:36 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Mon, 5 Sep 2005 15:36:34 +0000 (15:36 +0000)
enable it by adding WANT_GCC40=yes to make.conf.

Makefile.inc1
etc/defaults/make.conf
gnu/lib/Makefile
gnu/usr.bin/Makefile

index fe64c32..b258c14 100644 (file)
@@ -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/}
index d865071..9ca33cf 100644 (file)
@@ -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
 # 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.
index 2270a47..9294ace 100644 (file)
@@ -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 <bsd.subdir.mk>
index cc9934d..97cef6d 100644 (file)
@@ -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 <bsd.subdir.mk>