mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
Compile crt0.o, crtbegin.o and crtend.o with -fpie/-fPIE. This requires
gcc with pie support to be built first. ok kettenis@
This commit is contained in:
parent
3497dfe12e
commit
e8e072b5be
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user