summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2001-12-31 00:11:13 +0000
committerthorpej <thorpej@NetBSD.org>2001-12-31 00:11:13 +0000
commita50163af65ff7f8fb7c09f5a8ef176aa4e9e220c (patch)
tree0494a4d8de109eab3ad0f0a023570d91a911172e /lib
parentc41160abff4a09ec1c05d9201ae42afe327cede7 (diff)
Build separate crt{begin,end}.o and crt{begin,end}S.o files, rather
than linking them at install time. Forthcoming changes require different behavior for static vs. shared object versions of these files.
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/common_elf/Makefile.inc19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/csu/common_elf/Makefile.inc b/lib/csu/common_elf/Makefile.inc
index f1b3be57941..5e6d6e43e72 100644
--- a/lib/csu/common_elf/Makefile.inc
+++ b/lib/csu/common_elf/Makefile.inc
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2001/12/30 23:45:00 thorpej Exp $
+# $NetBSD: Makefile.inc,v 1.12 2001/12/31 00:11:13 thorpej Exp $
.if !defined(ELFSIZE)
ELFSIZE=32
@@ -19,7 +19,7 @@ COPTS+= -fPIC
.PATH: ${.CURDIR}/../common_elf
-OBJS= crt0.o gcrt0.o crtbegin.o crtend.o
+OBJS= crt0.o gcrt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o
CLEANFILES+= core a.out
@@ -43,16 +43,25 @@ crtbegin.o: crtbegin.c
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
+crtbeginS.o: crtbegin.c
+ @echo "${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}"
+ @${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
+
crtend.o: crtend.c
@echo "${COMPILE.c} ${.ALLSRC} -o ${.TARGET}"
@${COMPILE.c} ${.ALLSRC} -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
+crtendS.o: crtend.c
+ @echo "${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}"
+ @${COMPILE.c} -DSHARED ${.ALLSRC} -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
+
FILES=${OBJS}
FILESDIR=${LIBDIR}
-LINKS= ${LIBDIR}/crtbegin.o ${LIBDIR}/crtbeginS.o \
- ${LIBDIR}/crtend.o ${LIBDIR}/crtendS.o
-
.include <bsd.prog.mk>