summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/csu/alpha/Makefile14
-rw-r--r--lib/csu/amd64/Makefile14
-rw-r--r--lib/csu/arm/Makefile12
-rw-r--r--lib/csu/hppa/Makefile14
-rw-r--r--lib/csu/i386/Makefile14
-rw-r--r--lib/csu/powerpc/Makefile12
-rw-r--r--lib/csu/sh/Makefile14
-rw-r--r--lib/csu/sparc64/Makefile14
8 files changed, 54 insertions, 54 deletions
diff --git a/lib/csu/alpha/Makefile b/lib/csu/alpha/Makefile
index 7e11c9d8e2d..40ae624e089 100644
--- a/lib/csu/alpha/Makefile
+++ b/lib/csu/alpha/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.17 2008/10/06 14:17:49 kurt Exp $
+# $OpenBSD: Makefile,v 1.18 2008/11/11 23:49:46 kurt Exp $
# $NetBSD: Makefile,v 1.6 1996/10/18 05:27:38 thorpej Exp $
CFLAGS+= -DLIBC_SCCS -DELFSIZE=64
@@ -12,8 +12,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fPIE ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fPIE ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -24,8 +24,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fPIE ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fPIE ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -36,8 +36,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fPIE ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fPIE ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/amd64/Makefile b/lib/csu/amd64/Makefile
index cd5bf9a79b9..a9e585b866c 100644
--- a/lib/csu/amd64/Makefile
+++ b/lib/csu/amd64/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2008/10/06 14:17:49 kurt Exp $
+# $OpenBSD: Makefile,v 1.5 2008/11/11 23:49:46 kurt Exp $
CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer
OBJS= crt0.o gcrt0.o
@@ -13,8 +13,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -25,8 +25,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -37,8 +37,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/arm/Makefile b/lib/csu/arm/Makefile
index cf055857f70..408c1de00a7 100644
--- a/lib/csu/arm/Makefile
+++ b/lib/csu/arm/Makefile
@@ -12,8 +12,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fpie -DPIC ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fpie -DPIC ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -24,8 +24,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -36,8 +36,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/hppa/Makefile b/lib/csu/hppa/Makefile
index dd45b03d651..b592dadd36a 100644
--- a/lib/csu/hppa/Makefile
+++ b/lib/csu/hppa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2008/10/06 14:17:49 kurt Exp $
+# $OpenBSD: Makefile,v 1.7 2008/11/11 23:49:46 kurt Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CFLAGS+= -DLIBC_SCCS
@@ -12,8 +12,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -24,8 +24,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -36,8 +36,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile
index 45789cb9e32..3aa94ffbd55 100644
--- a/lib/csu/i386/Makefile
+++ b/lib/csu/i386/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 2008/10/06 14:17:49 kurt Exp $
+# $OpenBSD: Makefile,v 1.13 2008/11/11 23:49:46 kurt Exp $
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
CFLAGS+= -DLIBC_SCCS -fno-omit-frame-pointer
@@ -14,8 +14,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -26,8 +26,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -38,8 +38,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/powerpc/Makefile b/lib/csu/powerpc/Makefile
index 4d39b14e547..c9ef16fb33e 100644
--- a/lib/csu/powerpc/Makefile
+++ b/lib/csu/powerpc/Makefile
@@ -14,8 +14,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fpie ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -26,8 +26,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -38,8 +38,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fpie ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/sh/Makefile b/lib/csu/sh/Makefile
index 9cf2a7bccce..22651e0c489 100644
--- a/lib/csu/sh/Makefile
+++ b/lib/csu/sh/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.2 2008/09/26 16:22:15 drahn Exp $
+# $OpenBSD: Makefile,v 1.3 2008/11/11 23:49:46 kurt Exp $
# from: @(#)Makefile 8.1 (Berkeley) 6/1/93
CFLAGS+= -DLIBC_SCCS
@@ -12,8 +12,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fpie -DPIC ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fpie -DPIC ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -24,8 +24,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -36,8 +36,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fpie -DPIC ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
diff --git a/lib/csu/sparc64/Makefile b/lib/csu/sparc64/Makefile
index d8b03db3bc5..af8202d6d14 100644
--- a/lib/csu/sparc64/Makefile
+++ b/lib/csu/sparc64/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 2008/10/06 14:17:49 kurt Exp $
+# $OpenBSD: Makefile,v 1.7 2008/11/11 23:49:46 kurt Exp $
# $NetBSD: Makefile,v 1.6 1996/10/18 05:27:38 thorpej Exp $
CFLAGS+= -DLIBC_SCCS -DELFSIZE=64
@@ -14,8 +14,8 @@ CFLAGS+= -I${ELFDIR} -I${.CURDIR}
all: ${OBJS}
crt0.o: crt0.c
- @echo ${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
- @${COMPILE.c} -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -DCRT0 -fPIC ${.CURDIR}/crt0.c -o ${.TARGET}
+ @${COMPILE.c} -DCRT0 -fPIC ${.CURDIR}/crt0.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -26,8 +26,8 @@ gcrt0.o: crt0.c
@rm -f ${.TARGET}.o
crtbegin.o: crtbegin.c
- @echo ${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fPIC ${ELFDIR}/crtbegin.c -o ${.TARGET}
+ @${COMPILE.c} -fPIC ${ELFDIR}/crtbegin.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o
@@ -38,8 +38,8 @@ crtbeginS.o: crtbeginS.c
@rm -f ${.TARGET}.o
crtend.o: crtend.c
- @echo ${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}
- @${COMPILE.c} ${ELFDIR}/crtend.c -o ${.TARGET}.o
+ @echo ${COMPILE.c} -fPIC ${ELFDIR}/crtend.c -o ${.TARGET}
+ @${COMPILE.c} -fPIC ${ELFDIR}/crtend.c -o ${.TARGET}.o
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
@rm -f ${.TARGET}.o