Permalink
Browse files

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.
  • Loading branch information...
1 parent 75e35d3 commit 6100d1de78f204e56aabe46c57a31d6a686e8f55 @jrmarino jrmarino committed Feb 3, 2013
Showing with 24 additions and 15 deletions.
  1. +5 −5 Makefile.inc1
  2. +13 −0 UPDATING
  3. +5 −9 gnu/usr.bin/Makefile
  4. +1 −1 usr.bin/objformat/objformat.c
View
10 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; \
View
13 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 +
+-----------------------------------------------------------------------+
View
14 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
View
2 usr.bin/objformat/objformat.c
@@ -37,7 +37,7 @@
#include <unistd.h>
#ifndef CCVER_DEFAULT
-#define CCVER_DEFAULT "gcc44"
+#define CCVER_DEFAULT "gcc47"
#endif
#ifndef BINUTILSVER_DEFAULT

0 comments on commit 6100d1d

Please sign in to comment.