NO_GCC34 patch

Peter Avalos pavalos at theshell.com
Mon Sep 3 20:04:24 PDT 2007


Here's a patch for those that want to shave a few minutes off a
buildworld by not compiling gcc-3.4.  This will not attempt to remove
it.  What do you think?  If I don't hear differently, I'll commit this
next weekend.

--Peter

diff --git a/Makefile.inc1 b/Makefile.inc1
index 6f1c276..bb5609f 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -820,8 +820,10 @@ bootstrap-tools:
 _share=	share/syscons/scrnmaps
 .endif
 
+.if !defined(NO_GCC34)
 _gcc34_cross= gnu/usr.bin/cc34
 _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
 _binutils= gnu/usr.bin/binutils217
@@ -884,9 +886,11 @@ hierarchy:
 # to specify the correct CCVER or 'cc' will not exec the correct compiler.
 #
 libraries:
+.if !defined(NO_GCC34)
 	cd ${.CURDIR}; \
 	    HOST_CCVER=${HOST_CCVER} CCVER=gcc34 \
 		${MAKE} -f Makefile.inc1 _startup_libs34;
+.endif
 	cd ${.CURDIR}; \
 	    HOST_CCVER=${HOST_CCVER} CCVER=gcc41 \
 		${MAKE} -f Makefile.inc1 _startup_libs41;
diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf
index 7579dfc..1a9cc72 100644
--- a/etc/defaults/make.conf
+++ b/etc/defaults/make.conf
@@ -98,6 +98,7 @@ BDECFLAGS=	-W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \
 #NO_CVS=	true	# do not build CVS
 #NO_FORTRAN=	true	# do not build g77 and related libraries
 #NO_GAMES=	true	# do not enter the games subdirectory
+#NO_GCC34	true	# do not build gcc-3.4
 #NO_GDB=	true	# do not build GDB
 #NO_I4B=	true	# do not build isdn4bsd package
 #NO_IPFILTER=	true	# do not build IP Filter package
diff --git a/gnu/lib/Makefile b/gnu/lib/Makefile
index d0a2afd..9bc44df 100644
--- a/gnu/lib/Makefile
+++ b/gnu/lib/Makefile
@@ -1,7 +1,9 @@
 # $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.15 2007/08/09 22:50:37 corecode Exp $
 
-SUBDIR= libdialog libregex libreadline gcc34
-SUBDIR+= gcc41
+SUBDIR= libdialog libregex libreadline gcc41
+.if !defined(NO_GCC34)
+SUBDIR+= gcc34
+.endif
 
 .include <bsd.subdir.mk>
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index d995bcd..221d1e8 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -12,8 +12,11 @@ SUBDIR+=gdb
 .endif
 
 SUBDIR+= binutils217
+
+.if !defined(NO_GCC34)
 SUBDIR+= cc34
 .ORDER: binutils217 cc34
+.endif
 
 SUBDIR+= cc41
 .ORDER: binutils217 cc41
diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5
index 4315986..dbd9815 100644
--- a/share/man/man5/make.conf.5
+++ b/share/man/man5/make.conf.5
@@ -384,6 +384,9 @@ and related libraries.
 .It Va NO_GAMES
 .Pq Vt bool
 Set to not build games.
+.It Va NO_GCC34
+.Pq Vt bool
+Set to not build the older version of GCC (3.4).
 .It Va NO_GDB
 .Pq Vt bool
 Set to not build
Attachment:
pgp00000.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00000.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20070903/ca7c797b/attachment-0019.obj>


More information about the Kernel mailing list