summaryrefslogtreecommitdiff
path: root/lib/csu/i386
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2008-06-25 02:48:00 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2008-06-25 02:48:00 +0000
commit435c087049f33ae76a94e5413060193fea96667e (patch)
tree0d88cdec033ec775419995dd4e685c592a6079fe /lib/csu/i386
parent007c9a626e6d882900610d27ff3470d69413ab85 (diff)
Build pic versions of crt0, crtbegin & crtend for amd64, i386, powerpc,
sparc64. The rest will come later. okay drahn@ no objection miod@ "Get it in" deraadt@
Diffstat (limited to 'lib/csu/i386')
-rw-r--r--lib/csu/i386/Makefile25
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile
index 0155a11ac85..fb2c4f76508 100644
--- a/lib/csu/i386/Makefile
+++ b/lib/csu/i386/Makefile
@@ -1,8 +1,11 @@
-# $OpenBSD: Makefile,v 1.9 2004/01/08 14:59:15 drahn Exp $
+# $OpenBSD: Makefile,v 1.10 2008/06/25 02:47:59 kurt Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer
-OBJS= crt0.o gcrt0.o crtbegin.o crtend.o crtbeginS.o crtendS.o
+OBJS= crt0.o pcrt0.o gcrt0.o
+OBJS+= crtbegin.o crtend.o
+OBJS+= crtbeginP.o crtendP.o
+OBJS+= crtbeginS.o crtendS.o
SRCS= crt0.c crtbegin.c crtbeginS.c crtend.c crtendS.c
ELFDIR= ${.CURDIR}/../common_elf
@@ -19,6 +22,12 @@ crt0.o: crt0.c
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
+pcrt0.o: crt0.c
+ @echo ${COMPILE.c} ${PICFLAG} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
+
gcrt0.o: crt0.c
@echo ${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
@${COMPILE.c} -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
@@ -31,6 +40,12 @@ crtbegin.o: crtbegin.c
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
+crtbeginP.o: crtbegin.c
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
+
crtbeginS.o: crtbeginS.c
@echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}
@${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtbeginS.c -o ${.TARGET}.o
@@ -43,6 +58,12 @@ crtend.o: crtend.c
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
+crtendP.o: crtend.c
+ @echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @${LD} -x -r -o ${.TARGET} ${.TARGET}.o
+ @rm -f ${.TARGET}.o
+
crtendS.o: crtendS.c
@echo ${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}
@${COMPILE.c} ${PICFLAG} ${ELFDIR}/crtendS.c -o ${.TARGET}.o