Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Switch to using GCC's supplied crtbegin / crtend files.
details: https://anonhg.NetBSD.org/src/rev/04d113882234
branches: trunk
changeset: 569655:04d113882234
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Aug 28 00:18:38 2004 +0000
description:
Switch to using GCC's supplied crtbegin / crtend files.
diffstat:
Makefile | 7 +++++--
distrib/sets/lists/comp/shl.elf | 3 ++-
gnu/lib/Makefile | 4 ++--
lib/csu/common_elf/Makefile.inc | 13 +++++++------
4 files changed, 16 insertions(+), 11 deletions(-)
diffs (103 lines):
diff -r 6c6f24396e4a -r 04d113882234 Makefile
--- a/Makefile Fri Aug 27 20:37:28 2004 +0000
+++ b/Makefile Sat Aug 28 00:18:38 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.235 2004/07/30 07:05:11 lukem Exp $
+# $NetBSD: Makefile,v 1.236 2004/08/28 00:18:38 thorpej Exp $
#
# This is the top-level makefile for building NetBSD. For an outline of
@@ -68,6 +68,8 @@
# includes: installs include files.
# do-tools-compat: builds the "libnbcompat" library; needed for some
# random host tool programs in the source tree.
+# do-gnu-lib-crtstuff3: builds and installs prerequisites from
+# gnu/lib/crtstuff3
# do-gnu-lib-libgcc3: builds and installs prerequisites from gnu/lib/libgcc3
# do-lib-csu: builds and installs prerequisites from lib/csu.
# do-lib-libc: builds and installs prerequisites from lib/libc.
@@ -186,6 +188,7 @@
BUILDTARGETS+= do-tools-compat
BUILDTARGETS+= do-lib-csu
.if ${MKGCC} != "no"
+BUILDTARGETS+= do-gnu-lib-crtstuff${LIBGCC_EXT}
BUILDTARGETS+= do-gnu-lib-libgcc${LIBGCC_EXT}
.endif
BUILDTARGETS+= do-lib-libc
@@ -323,7 +326,7 @@
@true
.endfor
-.for dir in tools tools/compat lib/csu gnu/lib/libgcc${LIBGCC_EXT} lib/libc lib/libdes lib gnu/lib
+.for dir in tools tools/compat lib/csu gnu/lib/crtstuff${LIBGCC_EXT} gnu/lib/libgcc${LIBGCC_EXT} lib/libc lib/libdes lib gnu/lib
do-${dir:S/\//-/g}: .PHONY
.for targ in dependall install
${MAKEDIRTARGET} ${dir} ${targ}
diff -r 6c6f24396e4a -r 04d113882234 distrib/sets/lists/comp/shl.elf
--- a/distrib/sets/lists/comp/shl.elf Fri Aug 27 20:37:28 2004 +0000
+++ b/distrib/sets/lists/comp/shl.elf Sat Aug 28 00:18:38 2004 +0000
@@ -1,3 +1,4 @@
-# $NetBSD: shl.elf,v 1.51 2004/08/12 16:07:07 lukem Exp $
+# $NetBSD: shl.elf,v 1.52 2004/08/28 00:18:38 thorpej Exp $
./usr/lib/crtbeginS.o comp-c-lib
+./usr/lib/crtbeginT.o comp-c-lib
./usr/lib/crtendS.o comp-c-lib
diff -r 6c6f24396e4a -r 04d113882234 gnu/lib/Makefile
--- a/gnu/lib/Makefile Fri Aug 27 20:37:28 2004 +0000
+++ b/gnu/lib/Makefile Sat Aug 28 00:18:38 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2003/12/04 09:29:31 mrg Exp $
+# $NetBSD: Makefile,v 1.38 2004/08/28 00:18:38 thorpej Exp $
.include <bsd.own.mk>
@@ -10,7 +10,7 @@
. if ${HAVE_GCC3} == "no"
SUBDIR+= libg2c libgcc libobjc libstdc++
. else
-SUBDIR+= libg2c3 libfrtbegin libgcc3 libobjc3 libsupc++ libstdc++-v3
+SUBDIR+= crtstuff3 libg2c3 libfrtbegin libgcc3 libobjc3 libsupc++ libstdc++-v3
. endif
.endif
diff -r 6c6f24396e4a -r 04d113882234 lib/csu/common_elf/Makefile.inc
--- a/lib/csu/common_elf/Makefile.inc Fri Aug 27 20:37:28 2004 +0000
+++ b/lib/csu/common_elf/Makefile.inc Sat Aug 28 00:18:38 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.24 2003/11/11 11:32:39 dsl Exp $
+# $NetBSD: Makefile.inc,v 1.25 2004/08/28 00:18:38 thorpej Exp $
.include <bsd.own.mk>
@@ -24,9 +24,10 @@
COPTS+= -fPIC
.endif
-# If using an external toolchain, we expect crtbegin/crtend to be
-# supplied by that toolchain's run-time support.
-.if !defined(EXTERNAL_TOOLCHAIN)
+# We supply crtbegin / crtend *ONLY* if using the old in-tree GCC 2.95.3!
+# In all other cases (including use of an external toolchain), these will
+# be provided by that toolchain's run-time support.
+.if ${USE_TOOLS_TOOLCHAIN} == "yes" && !defined(EXTERNAL_TOOLCHAIN)
SRCS+= crtbegin.c crtend.c
OBJS+= crtbegin.o crtend.o
.if ${MKPIC} != "no"
@@ -62,7 +63,7 @@
@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
-.if !defined(EXTERNAL_TOOLCHAIN)
+.if ${USE_TOOLS_TOOLCHAIN} == "yes" && !defined(EXTERNAL_TOOLCHAIN)
crtbegin.o: crtbegin.c
@echo "${COMPILE.c} ${.IMPSRC} -o ${.TARGET}"
@${COMPILE.c} ${.IMPSRC} -o ${.TARGET}.o
@@ -86,7 +87,7 @@
@${COMPILE.c} -DSHARED ${.IMPSRC} -o ${.TARGET}.o
@${LD} -X -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
-.endif # ! EXTERNAL_TOOLCHAIN
+.endif # USE_TOOLS_TOOLCHAIN == "yes" && ! EXTERNAL_TOOLCHAIN
FILES=${OBJS}
FILESDIR=${LIBDIR}
Home |
Main Index |
Thread Index |
Old Index