Module Name:    src
Committed By:   skrll
Date:           Sun Nov 28 18:40:56 UTC 2010

Modified Files:
        src: Makefile
        src/gnu/lib: Makefile
        src/gnu/lib/crtstuff4: Makefile
        src/lib/csu: Makefile
        src/share/mk: bsd.own.mk

Log Message:
Centralise USE_COMPILERCRTSTUFF.

PCC might need help.


To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/Makefile
cvs rdiff -u -r1.46 -r1.47 src/gnu/lib/Makefile
cvs rdiff -u -r1.6 -r1.7 src/gnu/lib/crtstuff4/Makefile
cvs rdiff -u -r1.27 -r1.28 src/lib/csu/Makefile
cvs rdiff -u -r1.642 -r1.643 src/share/mk/bsd.own.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/Makefile
diff -u src/Makefile:1.279 src/Makefile:1.280
--- src/Makefile:1.279	Mon Nov 22 08:35:44 2010
+++ src/Makefile	Sun Nov 28 18:40:54 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.279 2010/11/22 08:35:44 plunky Exp $
+#	$NetBSD: Makefile,v 1.280 2010/11/28 18:40:54 skrll Exp $
 
 #
 # This is the top-level makefile for building NetBSD. For an outline of
@@ -87,7 +87,8 @@
 #                    gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and
 #                    gnu/lib/libgcc${LIBGCC_EXT}.
 #   do-libpcc:       builds and install prerequisites from
-#                    external/bsd/pcc/crtstuff and external/bsd/pcc/libpcc.
+#                    external/bsd/pcc/crtstuff (if necessary) and
+#                    external/bsd/pcc/libpcc.
 #   do-lib-libc:     builds and installs prerequisites from lib/libc.
 #   do-lib:          builds and installs prerequisites from lib.
 #   do-gnu-lib:      builds and installs prerequisites from gnu/lib.
@@ -409,7 +410,9 @@
 .endfor
 
 .if defined(HAVE_GCC)
+.if ${USE_COMPILERCRTSTUFF} == "yes"
 BUILD_CC_LIB= gnu/lib/crtstuff${LIBGCC_EXT}
+.endif
 BUILD_CC_LIB+= gnu/lib/libgcc${LIBGCC_EXT}
 .elif defined(HAVE_PCC)
 BUILD_CC_LIB+= external/bsd/pcc/crtstuff
@@ -442,9 +445,11 @@
 do-libgcc: .PHONY .MAKE
 .if defined(HAVE_GCC)
 .if ${MKGCC} != "no"
+.if ${USE_COMPILERCRTSTUFF} == "yes"
 .if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4")
 	${MAKEDIRTARGET} . do-gnu-lib-crtstuff${LIBGCC_EXT}
 .endif
+.endif
 	${MAKEDIRTARGET} . do-gnu-lib-libgcc${LIBGCC_EXT}
 .endif
 .endif
@@ -452,7 +457,9 @@
 do-compat-libgcc: .PHONY .MAKE
 .if defined(HAVE_GCC)
 .if ${MKGCC} != "no"
+.if ${USE_COMPILERCRTSTUFF} == "yes"
 	${MAKEDIRTARGET} . do-compat-gnu-lib-crtstuff${LIBGCC_EXT}
+.endif
 	${MAKEDIRTARGET} . do-compat-gnu-lib-libgcc${LIBGCC_EXT}
 .endif
 .endif
@@ -460,7 +467,9 @@
 do-libpcc: .PHONY .MAKE
 .if defined(HAVE_PCC)
 .if ${MKPCC} != "no"
+.if ${USE_COMPILERCRTSTUFF} == "yes"
 	${MAKEDIRTARGET} . do-pcc-lib-crtstuff
+.endif
 	${MAKEDIRTARGET} . do-pcc-lib-libpcc
 .endif
 .endif

Index: src/gnu/lib/Makefile
diff -u src/gnu/lib/Makefile:1.46 src/gnu/lib/Makefile:1.47
--- src/gnu/lib/Makefile:1.46	Mon Dec 14 12:43:48 2009
+++ src/gnu/lib/Makefile	Sun Nov 28 18:40:55 2010
@@ -1,9 +1,12 @@
-#	$NetBSD: Makefile,v 1.46 2009/12/14 12:43:48 uebayasi Exp $
+#	$NetBSD: Makefile,v 1.47 2010/11/28 18:40:55 skrll Exp $
 
 .include <bsd.own.mk>
 
 .if ${MKGCC} != "no"
-SUBDIR+= crtstuff4 libgcc4 libobjc4
+.if ${USE_COMPILERCRTSTUFF} == "yes"
+SUBDIR+= crtstuff4
+.endif
+SUBDIR+= libgcc4 libobjc4
 .if ${MKCXX} != "no"
 SUBDIR+= libsupc++4 libstdc++-v3_4
 .endif

Index: src/gnu/lib/crtstuff4/Makefile
diff -u src/gnu/lib/crtstuff4/Makefile:1.6 src/gnu/lib/crtstuff4/Makefile:1.7
--- src/gnu/lib/crtstuff4/Makefile:1.6	Sat Aug  7 18:02:40 2010
+++ src/gnu/lib/crtstuff4/Makefile	Sun Nov 28 18:40:55 2010
@@ -1,17 +1,13 @@
-#	$NetBSD: Makefile,v 1.6 2010/08/07 18:02:40 joerg Exp $
+#	$NetBSD: Makefile,v 1.7 2010/11/28 18:40:55 skrll Exp $
 
 REQUIRETOOLS=	yes
 NOLINT=		# defined
 
 .include <bsd.own.mk>
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
-MODERN_LIB_CSU=yes
-.endif
-
 # If using an external toolchain, we expect crtbegin/crtend to be
 # supplied by that toolchain's run-time support.
-.if !defined(MODERN_LIB_CSU) && !defined(EXTERNAL_TOOLCHAIN) && ${MKGCC} != "no"
+.if !defined(EXTERNAL_TOOLCHAIN) && ${MKGCC} != "no"
 
 DIST=		${NETBSDSRCDIR}/gnu/dist/gcc4
 GNUHOSTDIST=	${DIST}

Index: src/lib/csu/Makefile
diff -u src/lib/csu/Makefile:1.27 src/lib/csu/Makefile:1.28
--- src/lib/csu/Makefile:1.27	Sat Aug  7 18:01:32 2010
+++ src/lib/csu/Makefile	Sun Nov 28 18:40:56 2010
@@ -1,15 +1,17 @@
-#	$NetBSD: Makefile,v 1.27 2010/08/07 18:01:32 joerg Exp $
+#	$NetBSD: Makefile,v 1.28 2010/11/28 18:40:56 skrll Exp $
 
 .include <bsd.own.mk>
 
 CSU_MACHINE_ARCH?=	${MACHINE_ARCH}
 
-.if ${CSU_MACHINE_ARCH} == "i386" || ${CSU_MACHINE_ARCH} == "x86_64"
+.if ${USE_COMPILERCRTSTUFF} != "yes"
+
 ARCHDIR:=	${.PARSEDIR}/arch/${CSU_MACHINE_ARCH}
 .PATH:	${ARCHDIR}
 .  include "${ARCHDIR}/Makefile.inc"
 
 .  include "${.PARSEDIR}/common/Makefile.inc"
+
 .else
 
 .  if exists(${CSU_MACHINE_ARCH}_elf/Makefile)

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.642 src/share/mk/bsd.own.mk:1.643
--- src/share/mk/bsd.own.mk:1.642	Fri Nov 12 16:05:49 2010
+++ src/share/mk/bsd.own.mk	Sun Nov 28 18:40:56 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.642 2010/11/12 16:05:49 tsutsui Exp $
+#	$NetBSD: bsd.own.mk,v 1.643 2010/11/28 18:40:56 skrll Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -50,6 +50,13 @@
 HAVE_GCC=	4
 .endif
 
+.if \
+    ${MACHINE_ARCH} == "i386" || \
+    ${MACHINE_ARCH} == "x86_64"
+USE_COMPILERCRTSTUFF?=	no
+.endif
+USE_COMPILERCRTSTUFF?=	yes
+
 # default to GDB6
 HAVE_GDB?=	6
 

Reply via email to