From 6100d1de78f204e56aabe46c57a31d6a686e8f55 Mon Sep 17 00:00:00 2001 From: John Marino Date: Sun, 3 Feb 2013 10:12:27 +0100 Subject: [PATCH] Promote GCC 4.7 to be the default compiler This commit causes world and kernel to be built by GCC 4.7 if the compiler is not specified. As a side effect, the make variable "NO_GCC47" no longer functions. GCC 4.7 will always be built. In addition to changing the default of WORLD_CCVER, the CCVER variable also defaults to "gcc47" now. The variable "NO_GCC44" has been resurrected to prevent GCC 4.4 from being built. As noted in the UPDATING file, using this option is highly discouraged. GCC 4.4 is very useful in building some packages in pkgsrc that fail to build with GCC 4.7's stricter standards. The new DPorts system is designed to use GCC 4.4 by default, regardless of the base's default compiler setting. If at all possible, build *both* compilers for the maximum flexibility to build packages. --- Makefile.inc1 | 10 +++++----- UPDATING | 13 +++++++++++++ gnu/usr.bin/Makefile | 14 +++++--------- usr.bin/objformat/objformat.c | 2 +- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 29dd3ea9a5..198d336b73 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -119,7 +119,7 @@ DESTDIRBASE?= ${OBJTREE}${.CURDIR} .MAKEFLAGS:= ${.MAKEFLAGS:NDESTDIR=*} # This section sets the tools used to build the world/kernel -WORLD_CCVER?= gcc44 +WORLD_CCVER?= gcc47 WORLD_LDVER?= ld.bfd WORLD_BINUTILSVER?= binutils222 @@ -840,12 +840,12 @@ _share= share/syscons/scrnmaps .endif _gcc_common_cross= gnu/usr.bin/gmp gnu/usr.bin/mpfr +.if !defined(NO_GCC44) _gcc44_cross= gnu/usr.bin/cc44 _gcc44_tools= gnu/usr.bin/cc44/cc_prep gnu/usr.bin/cc44/cc_tools -.if !defined(NO_GCC47) +.endif _gcc47_cross= lib/libz gnu/usr.bin/mpc gnu/usr.bin/cc47 _gcc47_tools= gnu/usr.bin/cc47/cc_prep gnu/usr.bin/cc47/cc_tools -.endif _custom_cross= libexec/customcc _binutils= gnu/usr.bin/${WORLD_BINUTILSVER} @@ -911,14 +911,14 @@ hierarchy: # to specify the correct CCVER or 'cc' will not exec the correct compiler. # libraries: -.if !defined(NO_GCC47) cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc47 \ make -f Makefile.inc1 _startup_libs47; -.endif +.if !defined(NO_GCC44) cd ${.CURDIR}; \ HOST_CCVER=${HOST_CCVER} CCVER=gcc44 \ make -f Makefile.inc1 _startup_libs44; +.endif cd ${.CURDIR}; \ make -f Makefile.inc1 _startup_libs; \ make -f Makefile.inc1 _prebuild_libs; \ diff --git a/UPDATING b/UPDATING index 160054224a..7510d24647 100644 --- a/UPDATING +++ b/UPDATING @@ -8,6 +8,19 @@ # If you discover any problem, please contact the bugs@lists.dragonflybsd.org # mailing list with the details. +GCC 4.7 +------- + +DragonFly has switched base compilers. GCC 4.7 is now the default +compiler and GCC 4.4 is the alternative compiler. The "NO_GCC47" make +variable ceases to work now. + +Users who wish to build only GCC 4.7 have to use NO_GCC44 in the +/etc/make.conf to prohibit GCC 4.4 from building. However, using it is +highly discouraged. There are a few packages in pkgsrc that do not build +with GCC 4.7 and the new "DPorts" system uses GCC 4.4 by default. At +this time, it is recommended to keep both compilers on the base system. + +-----------------------------------------------------------------------+ + UPGRADING DRAGONFLY FROM 3.2 to later versions + +-----------------------------------------------------------------------+ diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile index cc52fa7171..a15847fac6 100644 --- a/gnu/usr.bin/Makefile +++ b/gnu/usr.bin/Makefile @@ -19,18 +19,14 @@ SUBDIR+= ${BU_BACKUP} SUBDIR+= gmp SUBDIR+= mpfr - -.if !defined(NO_GCC47) SUBDIR+= mpc -.endif - -SUBDIR+= cc44 - -.if !defined(NO_GCC47) SUBDIR+= cc47 -.ORDER: ${BU_PRIMARY} gmp mpfr mpc cc44 cc47 + +.if defined(NO_GCC44) +.ORDER: ${BU_PRIMARY} gmp mpfr mpc cc47 .else -.ORDER: ${BU_PRIMARY} gmp mpfr cc44 +SUBDIR+= cc44 +.ORDER: ${BU_PRIMARY} gmp mpfr mpc cc47 cc44 .endif # maximum parallelism diff --git a/usr.bin/objformat/objformat.c b/usr.bin/objformat/objformat.c index c5287840bb..76aee797b8 100644 --- a/usr.bin/objformat/objformat.c +++ b/usr.bin/objformat/objformat.c @@ -37,7 +37,7 @@ #include #ifndef CCVER_DEFAULT -#define CCVER_DEFAULT "gcc44" +#define CCVER_DEFAULT "gcc47" #endif #ifndef BINUTILSVER_DEFAULT -- 2.41.0