Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/lib/crtstuff3 Build infrastructure for GCC's "crtstuff".
details: https://anonhg.NetBSD.org/src/rev/b09f9d0a15ba
branches: trunk
changeset: 569573:b09f9d0a15ba
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Aug 24 20:52:17 2004 +0000
description:
Build infrastructure for GCC's "crtstuff".
diffstat:
gnu/lib/crtstuff3/Makefile | 64 +++++++++++++++++++++++++++++++++++++++++++
gnu/lib/crtstuff3/crtbegin.c | 9 ++++++
gnu/lib/crtstuff3/crtbeginS.c | 10 ++++++
gnu/lib/crtstuff3/crtbeginT.c | 10 ++++++
gnu/lib/crtstuff3/crtend.c | 9 ++++++
gnu/lib/crtstuff3/crtendS.c | 10 ++++++
6 files changed, 112 insertions(+), 0 deletions(-)
diffs (136 lines):
diff -r 4779a999d1fe -r b09f9d0a15ba gnu/lib/crtstuff3/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/lib/crtstuff3/Makefile Tue Aug 24 20:52:17 2004 +0000
@@ -0,0 +1,64 @@
+# $NetBSD: Makefile,v 1.1 2004/08/24 20:52:17 thorpej Exp $
+
+REQUIRETOOLS= yes
+NOLINT= # defined
+
+.include <bsd.own.mk>
+
+# If using an external toolchain, we expect crtbegin/crtend to be
+# supplied by that toolchain's run-time support.
+.if !defined(EXTERNAL_TOOLCHAIN) && ${MKGCC} != "no"
+
+DIST= ${NETBSDSRCDIR}/gnu/dist/gcc
+GNUHOSTDIST= ${DIST}
+GCCARCH= ${NETBSDSRCDIR}/gnu/usr.bin/gcc3/arch/${MACHINE_ARCH}
+
+GALLCFLAGS= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS}
+
+CPPFLAGS+= -I${GCCARCH} ${GALLCFLAGS:M-D*} ${GALLCFLAGS:M-I*:N-I.*}
+CPPFLAGS+= -I.
+
+GCFLAGS= ${GALLCFLAGS:N-D*:N-I*:N-i*:N./*}
+
+DPSRCS+= ${.CURDIR}/arch/${MACHINE_ARCH}.mk tconfig.h
+CLEANFILES+= cs-tconfig.h tconfig.h
+
+.if exists(${.CURDIR}/arch/${MACHINE_ARCH}.mk)
+.include "${.CURDIR}/arch/${MACHINE_ARCH}.mk"
+.endif
+
+SRCS+= crtbegin.c crtend.c
+OBJS+= crtbegin.o crtend.o
+.if ${MKPIC} != "no"
+SRCS+= crtbeginS.c crtendS.c
+OBJS+= crtbeginS.o crtendS.o # for shared libraries
+SRCS+= crtbeginT.c
+OBJS+= crtbeginT.o # for -static links
+.endif
+
+realall: ${OBJS}
+
+FILES=${OBJS}
+FILESDIR=${LIBDIR}
+
+.PATH: ${DIST}/gcc ${DIST}/gcc/config ${G_CONFIGDIR}
+
+tconfig.h:
+ ${_MKTARGET_CREATE}
+ TM_DEFINES="$(G_tm_defines)" \
+ HEADERS="$(G_xm_file)" XM_DEFINES="$(G_xm_defines)" \
+ TARGET_CPU_DEFAULT="" \
+ ${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
+
+.include <bsd.prog.mk>
+
+# Override the default .c -> .o rule.
+.c.o:
+ ${CC} ${CPPFLAGS} ${GCFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o
+ mv ${.TARGET}.o ${.TARGET}
+
+.else
+
+.include <bsd.prog.mk> # do nothing
+
+.endif # ! EXTERNAL_TOOLCHAIN && MKGCC != no
diff -r 4779a999d1fe -r b09f9d0a15ba gnu/lib/crtstuff3/crtbegin.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/lib/crtstuff3/crtbegin.c Tue Aug 24 20:52:17 2004 +0000
@@ -0,0 +1,9 @@
+/* $NetBSD: crtbegin.c,v 1.1 2004/08/24 20:52:17 thorpej Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_BEGIN
+#include "crtstuff.c"
diff -r 4779a999d1fe -r b09f9d0a15ba gnu/lib/crtstuff3/crtbeginS.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/lib/crtstuff3/crtbeginS.c Tue Aug 24 20:52:17 2004 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: crtbeginS.c,v 1.1 2004/08/24 20:52:17 thorpej Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_BEGIN
+#define CRTSTUFFS_O
+#include "crtstuff.c"
diff -r 4779a999d1fe -r b09f9d0a15ba gnu/lib/crtstuff3/crtbeginT.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/lib/crtstuff3/crtbeginT.c Tue Aug 24 20:52:17 2004 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: crtbeginT.c,v 1.1 2004/08/24 20:52:17 thorpej Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_BEGIN
+#define CRTSTUFFT_O
+#include "crtstuff.c"
diff -r 4779a999d1fe -r b09f9d0a15ba gnu/lib/crtstuff3/crtend.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/lib/crtstuff3/crtend.c Tue Aug 24 20:52:17 2004 +0000
@@ -0,0 +1,9 @@
+/* $NetBSD: crtend.c,v 1.1 2004/08/24 20:52:17 thorpej Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_END
+#include "crtstuff.c"
diff -r 4779a999d1fe -r b09f9d0a15ba gnu/lib/crtstuff3/crtendS.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/lib/crtstuff3/crtendS.c Tue Aug 24 20:52:17 2004 +0000
@@ -0,0 +1,10 @@
+/* $NetBSD: crtendS.c,v 1.1 2004/08/24 20:52:17 thorpej Exp $ */
+
+/*
+ * Written by Jason R. Thorpe, August 24, 2004.
+ * Public domain.
+ */
+
+#define CRT_END
+#define CRTSTUFFS_O
+#include "crtstuff.c"
Home |
Main Index |
Thread Index |
Old Index