Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Centralise USE_COMPILERCRTSTUFF.



details:   https://anonhg.NetBSD.org/src/rev/957f3d52d2a9
branches:  trunk
changeset: 759104:957f3d52d2a9
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Nov 28 18:40:54 2010 +0000

description:
Centralise USE_COMPILERCRTSTUFF.

PCC might need help.

diffstat:

 Makefile                   |  13 +++++++++++--
 gnu/lib/Makefile           |   7 +++++--
 gnu/lib/crtstuff4/Makefile |   8 ++------
 lib/csu/Makefile           |   6 ++++--
 share/mk/bsd.own.mk        |   9 ++++++++-
 5 files changed, 30 insertions(+), 13 deletions(-)

diffs (148 lines):

diff -r acd66f15ef2f -r 957f3d52d2a9 Makefile
--- a/Makefile  Sun Nov 28 16:08:28 2010 +0000
+++ b/Makefile  Sun Nov 28 18:40:54 2010 +0000
@@ -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
diff -r acd66f15ef2f -r 957f3d52d2a9 gnu/lib/Makefile
--- a/gnu/lib/Makefile  Sun Nov 28 16:08:28 2010 +0000
+++ b/gnu/lib/Makefile  Sun Nov 28 18:40:54 2010 +0000
@@ -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
diff -r acd66f15ef2f -r 957f3d52d2a9 gnu/lib/crtstuff4/Makefile
--- a/gnu/lib/crtstuff4/Makefile        Sun Nov 28 16:08:28 2010 +0000
+++ b/gnu/lib/crtstuff4/Makefile        Sun Nov 28 18:40:54 2010 +0000
@@ -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}
diff -r acd66f15ef2f -r 957f3d52d2a9 lib/csu/Makefile
--- a/lib/csu/Makefile  Sun Nov 28 16:08:28 2010 +0000
+++ b/lib/csu/Makefile  Sun Nov 28 18:40:54 2010 +0000
@@ -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)
diff -r acd66f15ef2f -r 957f3d52d2a9 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Sun Nov 28 16:08:28 2010 +0000
+++ b/share/mk/bsd.own.mk       Sun Nov 28 18:40:54 2010 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index