diff options
author | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-08-21 14:46:21 +0000 |
---|---|---|
committer | Pascal Stumpf <pascal@cvs.openbsd.org> | 2012-08-21 14:46:21 +0000 |
commit | 9333c875627ad69d46ab3793263036ff3b45cc49 (patch) | |
tree | 697841a9433248956f025a7d1b3cd8019dfef64c | |
parent | 1caaeac6aae64a980b30cd0f00e3d491be174c97 (diff) |
Add NOPIE= bits for sys/arch/*/stand to ensure that bootblocks will always be
built with -fno-pie. This gets the hairiest part of PIE out of the way ...
ok deraadt@
92 files changed, 206 insertions, 91 deletions
diff --git a/sys/arch/alpha/stand/boot/Makefile b/sys/arch/alpha/stand/boot/Makefile index 0f5e39e69b1..835f06f82bf 100644 --- a/sys/arch/alpha/stand/boot/Makefile +++ b/sys/arch/alpha/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2011/06/05 21:49:36 miod Exp $ +# $OpenBSD: Makefile,v 1.18 2012/08/21 14:46:17 pascal Exp $ # $NetBSD: Makefile,v 1.17 1997/04/17 07:27:46 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -10,6 +10,7 @@ PROG = boot SRCS = start.S boot.c disk.c conf.c prom.c prom_disp.S OSFpal.c SRCS+= devopen.c filesystem.c loadfile_subr.c prom_swpal.S NOMAN= +NOPIE= INSTALL_STRIP= BINMODE= 444 diff --git a/sys/arch/alpha/stand/bootxx/Makefile b/sys/arch/alpha/stand/bootxx/Makefile index 6c1378759c4..a55d2715bbd 100644 --- a/sys/arch/alpha/stand/bootxx/Makefile +++ b/sys/arch/alpha/stand/bootxx/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2011/06/05 21:49:36 miod Exp $ +# $OpenBSD: Makefile,v 1.12 2012/08/21 14:46:18 pascal Exp $ # $NetBSD: Makefile,v 1.12 1997/04/17 07:27:49 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -9,6 +9,7 @@ PROG = bootxx SRCS = start.S bootxx.c prom.c prom_disp.S puts.c NOMAN= +NOPIE= INSTALL_STRIP= BINMODE= 444 diff --git a/sys/arch/alpha/stand/netboot/Makefile b/sys/arch/alpha/stand/netboot/Makefile index 52890e31ed5..54b242814f6 100644 --- a/sys/arch/alpha/stand/netboot/Makefile +++ b/sys/arch/alpha/stand/netboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2011/06/05 21:49:36 miod Exp $ +# $OpenBSD: Makefile,v 1.11 2012/08/21 14:46:18 pascal Exp $ # $NetBSD: Makefile,v 1.11 1997/04/17 07:27:50 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -13,6 +13,7 @@ SRCS+= dev_net.c conf.c devopen.c SRCS+= if_prom.c getsecs.c SRCS+= loadfile_subr.c NOMAN= +NOPIE= INSTALL_STRIP= BINMODE= 444 diff --git a/sys/arch/amd64/stand/Makefile.inc b/sys/arch/amd64/stand/Makefile.inc index 41cc0024285..3058ff81546 100644 --- a/sys/arch/amd64/stand/Makefile.inc +++ b/sys/arch/amd64/stand/Makefile.inc @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile.inc,v 1.5 2007/11/25 18:25:30 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.6 2012/08/21 14:46:18 pascal Exp $ CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror CFLAGS+= -fno-stack-protector +CFLAGS+= ${NOPIE_FLAGS} CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR} SACFLAGS=-D_STANDALONE DEBUGLIBS=no diff --git a/sys/arch/amd64/stand/biosboot/Makefile b/sys/arch/amd64/stand/biosboot/Makefile index c15c938b314..efb92d2d53d 100644 --- a/sys/arch/amd64/stand/biosboot/Makefile +++ b/sys/arch/amd64/stand/biosboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2004/10/09 21:15:21 mickey Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:18 pascal Exp $ MAN= biosboot.8 @@ -18,7 +18,9 @@ ${PROG}: $(OBJS) $(DPADD) CPPFLAGS+=-DLOADADDR=$(LOADADDR) -DLINKADDR=$(LINKADDR) -DBOOTMAGIC=$(BOOTMAGIC) CPPFLAGS+=${DEBUGFLAGS} +CPPFLAGS+=${NOPIE_FLAGS} AFLAGS+=-m32 # -Wa,-a +AFLAGS+=${NOPIE_FLAGS} .else NOPROG= .endif diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index e53352882a2..279ffaddf6a 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2007/11/25 18:25:30 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -57,5 +57,7 @@ CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -DLINKADDR=${LINKADDR} CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD +CFLAGS+=${NOPIE_FLAGS} AFLAGS+=-m32 # -Wa,-R +AFLAGS+=${NOPIE_FLAGS} # AFLAGS+=-Wa,-a diff --git a/sys/arch/amd64/stand/cdboot/Makefile b/sys/arch/amd64/stand/cdboot/Makefile index 33b56c737a9..91fd4d8c59c 100644 --- a/sys/arch/amd64/stand/cdboot/Makefile +++ b/sys/arch/amd64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2007/11/25 18:25:30 deraadt Exp $ +# $OpenBSD: Makefile,v 1.12 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -64,4 +64,6 @@ CPPFLAGS+=-DLINKADDR=${LINKADDR} -I${S}/stand/boot CFLAGS+=-m32 ${SACFLAGS} -D__INTERNAL_LIBSA_CREAD CFLAGS+=-DOSREV=\"${OSREV}\" -DMACHINE=\"${MACHINE}\" CFLAGS+=-DKERNEL=\"/${OSREV}/${MACHINE}/bsd.rd\" +CFLAGS+=${NOPIE_FLAGS} AFLAGS+=-m32 +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/amd64/stand/cdbr/Makefile b/sys/arch/amd64/stand/cdbr/Makefile index e48d84a2430..bb11cdd1350 100644 --- a/sys/arch/amd64/stand/cdbr/Makefile +++ b/sys/arch/amd64/stand/cdbr/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2004/10/09 21:15:21 mickey Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:18 pascal Exp $ # PROG= cdbr @@ -6,6 +6,7 @@ SRCS= cdbr.S AFLAGS+=-m32 -I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a AFLAGS+=-DOSREV=\"${OSREV}\" AFLAGS+=-DMACH=\"${MACHINE}\" -DMACH_U=\"${MACHINE:U}\" +AFLAGS+=${NOPIE_FLAGS} LD=ld ORG= 0x0000 LDFLAGS=-melf_i386 -nostdlib -Ttext ${ORG} -x -N -s -Bstatic -e start diff --git a/sys/arch/amd64/stand/mbr/Makefile b/sys/arch/amd64/stand/mbr/Makefile index b6c6ca436b5..7b2729f1b65 100644 --- a/sys/arch/amd64/stand/mbr/Makefile +++ b/sys/arch/amd64/stand/mbr/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 2004/10/09 21:15:21 mickey Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:18 pascal Exp $ # PROG= mbr SRCS= mbr.S AFLAGS+=-m32 -I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a +AFLAGS+=${NOPIE_FLAGS} LD=ld LDFLAGS=-melf_i386 -nostdlib -Ttext 0 -x -N -s -Bstatic -e start LDFLAGS+=-L/usr/libdata diff --git a/sys/arch/amd64/stand/pxeboot/Makefile b/sys/arch/amd64/stand/pxeboot/Makefile index 1f346cbb1c8..2e6d054d195 100644 --- a/sys/arch/amd64/stand/pxeboot/Makefile +++ b/sys/arch/amd64/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2007/11/25 18:25:30 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -63,5 +63,7 @@ CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -DLINKADDR=${LINKADDR} CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD +CFLAGS+=${NOPIE_FLAGS} AFLAGS+=-m32 # -Wa,-R +AFLAGS+=${NOPIE_FLAGS} # AFLAGS+=-Wa,-a diff --git a/sys/arch/armish/stand/boot/Makefile b/sys/arch/armish/stand/boot/Makefile index f3935ada48f..f0b1a4cab9e 100644 --- a/sys/arch/armish/stand/boot/Makefile +++ b/sys/arch/armish/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2008/06/09 15:01:56 deraadt Exp $ +# $OpenBSD: Makefile,v 1.8 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -35,6 +35,7 @@ USE_LOADFILE= yes LIBSA= ${SALIB} LDFLAGS= -T ${.CURDIR}/ldscript +NOPIE= ${PROG}: ${OBJS} ${LIBSA} ${LD} ${LDFLAGS} -o boot ${OBJS} ${LIBSA} ${LIBSA} diff --git a/sys/arch/aviion/stand/a2coff/Makefile b/sys/arch/aviion/stand/a2coff/Makefile index a2c242bfb7e..ff24f946b21 100644 --- a/sys/arch/aviion/stand/a2coff/Makefile +++ b/sys/arch/aviion/stand/a2coff/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.1 2006/05/09 19:32:43 miod Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ MAN= a2coff.8 MANSUBDIR=aviion .if ${MACHINE} == "aviion" PROG= a2coff BINDIR=/usr/mdec +NOPIE= .else NOPROG= .endif diff --git a/sys/arch/aviion/stand/libprom/Makefile b/sys/arch/aviion/stand/libprom/Makefile index acc02a5ad2b..410407c8cce 100644 --- a/sys/arch/aviion/stand/libprom/Makefile +++ b/sys/arch/aviion/stand/libprom/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.1 2006/05/16 22:48:18 miod Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ LIB=prom NOPIC= NOPROFILE= +NOPIE= S=${.CURDIR}/../../../.. DIR_SA=$S/lib/libsa diff --git a/sys/arch/aviion/stand/libsa/Makefile b/sys/arch/aviion/stand/libsa/Makefile index 2dc4e5d7d53..532035513c1 100644 --- a/sys/arch/aviion/stand/libsa/Makefile +++ b/sys/arch/aviion/stand/libsa/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.2 2007/11/26 10:01:42 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:18 pascal Exp $ LIB=sa NOPIC=nopic NOPROFILE=noprofile +NOPIE= # Logically src/sys S=${.CURDIR}/../../../.. diff --git a/sys/arch/aviion/stand/netboot/Makefile b/sys/arch/aviion/stand/netboot/Makefile index d7442fa4387..7fdf0d3f929 100644 --- a/sys/arch/aviion/stand/netboot/Makefile +++ b/sys/arch/aviion/stand/netboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2006/05/16 22:48:18 miod Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ SIZE?= size @@ -20,6 +20,7 @@ SRCS= crt.c boot.c conf.c devopen.c dev_net.c if_le.c version.c OBJS= ${SRCS:S/.c/.o/g} LIBS= ${LIBSA} ${LIBPROM} ${LIBZ} LDFLAGS+= -N -T ${STAGE2_RELOC} +NOPIE= all: netboot.aout diff --git a/sys/arch/beagle/stand/boot.scr/Makefile b/sys/arch/beagle/stand/boot.scr/Makefile index 5690d6fe967..00eb3ec529a 100644 --- a/sys/arch/beagle/stand/boot.scr/Makefile +++ b/sys/arch/beagle/stand/boot.scr/Makefile @@ -1,6 +1,7 @@ PROG = boot.scr SRCS = NOMAN= +NOPIE= .SUFFIXES: .cmd .scr diff --git a/sys/arch/hp300/stand/cdboot/Makefile b/sys/arch/hp300/stand/cdboot/Makefile index 5c27917e7a8..c6fb3b859d5 100644 --- a/sys/arch/hp300/stand/cdboot/Makefile +++ b/sys/arch/hp300/stand/cdboot/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.5 2007/11/26 10:01:42 deraadt Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:18 pascal Exp $ PROG= cdboot NOMAN= +NOPIE= .include "${.CURDIR}/../Makefile.inc" diff --git a/sys/arch/hp300/stand/installboot/Makefile b/sys/arch/hp300/stand/installboot/Makefile index d271daa3a0e..0e6c328bdcc 100644 --- a/sys/arch/hp300/stand/installboot/Makefile +++ b/sys/arch/hp300/stand/installboot/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.1 1997/07/14 08:14:42 downsj Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ # $NetBSD: Makefile,v 1.1 1997/02/04 03:52:59 thorpej Exp $ NOMAN= +NOPIE= beforeinstall: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/sys/arch/hp300/stand/libsaz/Makefile b/sys/arch/hp300/stand/libsaz/Makefile index 27e1a1779dc..30f2dfaff96 100644 --- a/sys/arch/hp300/stand/libsaz/Makefile +++ b/sys/arch/hp300/stand/libsaz/Makefile @@ -1,7 +1,9 @@ -# $OpenBSD: Makefile,v 1.4 2007/12/28 18:56:09 miod Exp $ +# $OpenBSD: Makefile,v 1.5 2012/08/21 14:46:18 pascal Exp $ CFLAGS+=-D__INTERNAL_LIBSA_CREAD +NOPIE= + # io routines SRCS+= cread.c diff --git a/sys/arch/hp300/stand/libz/Makefile b/sys/arch/hp300/stand/libz/Makefile index 07f50a52c20..fae4e85ef58 100644 --- a/sys/arch/hp300/stand/libz/Makefile +++ b/sys/arch/hp300/stand/libz/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.4 2006/08/17 06:31:10 miod Exp $ +# $OpenBSD: Makefile,v 1.5 2012/08/21 14:46:18 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} +NOPIE= + .PATH: ${S}/lib/libz .include "${.CURDIR}/../Makefile.inc" diff --git a/sys/arch/hp300/stand/mkboot/Makefile b/sys/arch/hp300/stand/mkboot/Makefile index eb359ada38e..8a4fa0470e5 100644 --- a/sys/arch/hp300/stand/mkboot/Makefile +++ b/sys/arch/hp300/stand/mkboot/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2006/08/17 06:31:10 miod Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:18 pascal Exp $ # $NetBSD: Makefile,v 1.2 1997/05/14 07:57:13 thorpej Exp $ PROG= mkboot NOMAN= +NOPIE= .include "${.CURDIR}/../Makefile.inc" diff --git a/sys/arch/hp300/stand/uboot/Makefile b/sys/arch/hp300/stand/uboot/Makefile index 6a13d9566e6..d3ea9a59aca 100644 --- a/sys/arch/hp300/stand/uboot/Makefile +++ b/sys/arch/hp300/stand/uboot/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.6 2007/11/26 10:01:42 deraadt Exp $ +# $OpenBSD: Makefile,v 1.7 2012/08/21 14:46:18 pascal Exp $ PROG= uboot NOMAN= +NOPIE= .include "${.CURDIR}/../Makefile.inc" diff --git a/sys/arch/hppa/stand/Makefile.inc b/sys/arch/hppa/stand/Makefile.inc index d6bb0f83991..720d984154d 100644 --- a/sys/arch/hppa/stand/Makefile.inc +++ b/sys/arch/hppa/stand/Makefile.inc @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile.inc,v 1.17 2008/03/04 22:33:03 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.18 2012/08/21 14:46:18 pascal Exp $ CFLAGS=${DEBUG} -Os -Wall -Werror +CFLAGS+=${NOPIE_FLAGS} CPPFLAGS+=-I${S} -I. -I${.CURDIR} SACFLAGS=-nostdinc -fno-builtin -D_STANDALONE -I${STANDIR}/libsa SACFLAGS+=-mdisable-fpregs -mfast-indirect-calls -mpa-risc-1-1 diff --git a/sys/arch/hppa/stand/boot/Makefile b/sys/arch/hppa/stand/boot/Makefile index c3a3846a175..e000e46e31e 100644 --- a/sys/arch/hppa/stand/boot/Makefile +++ b/sys/arch/hppa/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.21 2011/07/09 15:27:11 jsing Exp $ +# $OpenBSD: Makefile,v 1.22 2012/08/21 14:46:18 pascal Exp $ MAN= boot.8 MANSUBDIR=hppa @@ -57,3 +57,5 @@ NOPROG= CPPFLAGS+=${DEBUGFLAGS} -DRELOC=${LOADADDR} -DHEAP_LIMIT=${HEAP_LIMIT} CFLAGS+=$(SACFLAGS) +CFLAGS+=${NOPIE_FLAGS} +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/hppa/stand/cdboot/Makefile b/sys/arch/hppa/stand/cdboot/Makefile index aa88ec34006..256bfa4f5df 100644 --- a/sys/arch/hppa/stand/cdboot/Makefile +++ b/sys/arch/hppa/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2007/12/26 18:52:59 kettenis Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:18 pascal Exp $ NOMAN= no man S =${.CURDIR}/../../../.. @@ -60,3 +60,5 @@ NOPROG= CPPFLAGS+=-DRELOC=${LOADADDR} -DHEAP_LIMIT=${HEAP_LIMIT} CFLAGS+=$(SACFLAGS) -I../.. -I${.CURDIR}/../libsa -I${S}/stand/boot +CFLAGS+=${NOPIE_FLAGS} +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/hppa/stand/libsa/Makefile b/sys/arch/hppa/stand/libsa/Makefile index 2beb2c20d9d..bf3fa2f348f 100644 --- a/sys/arch/hppa/stand/libsa/Makefile +++ b/sys/arch/hppa/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2007/12/26 18:52:59 kettenis Exp $ +# $OpenBSD: Makefile,v 1.15 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -10,6 +10,7 @@ DIR_SA= $S/lib/libsa NOPROFILE=noprofile NOPIC=nopic +NOPIE= #AS=cat ; #AS+= -R diff --git a/sys/arch/hppa/stand/libz/Makefile b/sys/arch/hppa/stand/libz/Makefile index cb246dceb5e..e7db96f6a8a 100644 --- a/sys/arch/hppa/stand/libz/Makefile +++ b/sys/arch/hppa/stand/libz/Makefile @@ -1,9 +1,11 @@ -# $OpenBSD: Makefile,v 1.2 2003/12/18 02:27:13 millert Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:18 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} SADIR=${.CURDIR}/.. +NOPIE= + .PATH: ${S}/lib/libz .include "${S}/lib/libz/Makefile" diff --git a/sys/arch/hppa64/stand/Makefile.inc b/sys/arch/hppa64/stand/Makefile.inc index 7818b6a02d8..6fbb6a8c161 100644 --- a/sys/arch/hppa64/stand/Makefile.inc +++ b/sys/arch/hppa64/stand/Makefile.inc @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile.inc,v 1.4 2007/11/26 10:26:02 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2012/08/21 14:46:18 pascal Exp $ CFLAGS=${DEBUG} -Os -Wall -Werror +CFLAGS+=${NOPIE_FLAGS} CPPFLAGS+=-I${S} -I. -I${.CURDIR} SACFLAGS=-nostdinc -fno-builtin -D_STANDALONE -I${STANDIR}/libsa SACFLAGS+=-mdisable-fpregs -fno-stack-protector diff --git a/sys/arch/hppa64/stand/boot/Makefile b/sys/arch/hppa64/stand/boot/Makefile index 1b5780440e9..4719760caed 100644 --- a/sys/arch/hppa64/stand/boot/Makefile +++ b/sys/arch/hppa64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2007/11/26 08:36:49 deraadt Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:18 pascal Exp $ MAN= boot.8 MANSUBDIR=hppa64 @@ -64,3 +64,5 @@ NOPROG= CPPFLAGS+=${DEBUGFLAGS} -DRELOC=${LOADADDR} -DHEAP_LIMIT=${HEAP_LIMIT} CFLAGS+=$(SACFLAGS) +CFLAGS+=${NOPIE_FLAGS} +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/hppa64/stand/cdboot/Makefile b/sys/arch/hppa64/stand/cdboot/Makefile index 96f5792c252..76acfb9b96e 100644 --- a/sys/arch/hppa64/stand/cdboot/Makefile +++ b/sys/arch/hppa64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2007/11/26 08:36:49 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:18 pascal Exp $ NOMAN= no man S =${.CURDIR}/../../../.. @@ -60,3 +60,5 @@ NOPROG= CPPFLAGS+=-DRELOC=${LOADADDR} -DHEAP_LIMIT=${HEAP_LIMIT} CFLAGS+=$(SACFLAGS) -I../.. -I${.CURDIR}/../libsa -I${S}/stand/boot +CFLAGS+=${NOPIE_FLAGS} +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/hppa64/stand/libsa/Makefile b/sys/arch/hppa64/stand/libsa/Makefile index eda10f3436e..a87f2cb9e66 100644 --- a/sys/arch/hppa64/stand/libsa/Makefile +++ b/sys/arch/hppa64/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2005/04/01 10:40:48 mickey Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -10,6 +10,7 @@ DIR_SA= $S/lib/libsa NOPROFILE=noprofile NOPIC=nopic +NOPIE= #AS=cat ; #AS+= -R diff --git a/sys/arch/hppa64/stand/libz/Makefile b/sys/arch/hppa64/stand/libz/Makefile index d6ed6c93837..db09dc39108 100644 --- a/sys/arch/hppa64/stand/libz/Makefile +++ b/sys/arch/hppa64/stand/libz/Makefile @@ -1,9 +1,11 @@ -# $OpenBSD: Makefile,v 1.1 2005/04/01 10:40:49 mickey Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:18 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} SADIR=${.CURDIR}/.. +NOPIE= + .PATH: ${S}/lib/libz .include "${S}/lib/libz/Makefile" diff --git a/sys/arch/i386/stand/Makefile.inc b/sys/arch/i386/stand/Makefile.inc index 1cbd414aeb0..76b01abcfcc 100644 --- a/sys/arch/i386/stand/Makefile.inc +++ b/sys/arch/i386/stand/Makefile.inc @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile.inc,v 1.40 2007/11/26 10:26:02 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.41 2012/08/21 14:46:18 pascal Exp $ CFLAGS=${DEBUG} ${COPTS} -Os -Wall -Werror CFLAGS+= -fno-stack-protector +CFLAGS+= ${NOPIE_FLAGS} CPPFLAGS+=-I${S} -I${SADIR}/libsa -I. -I${.CURDIR} SACFLAGS=-D_STANDALONE DEBUGLIBS=no diff --git a/sys/arch/i386/stand/biosboot/Makefile b/sys/arch/i386/stand/biosboot/Makefile index 853b57203c3..82a08d90348 100644 --- a/sys/arch/i386/stand/biosboot/Makefile +++ b/sys/arch/i386/stand/biosboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.21 2003/04/17 03:43:18 drahn Exp $ +# $OpenBSD: Makefile,v 1.22 2012/08/21 14:46:18 pascal Exp $ MAN= biosboot.8 @@ -17,7 +17,9 @@ ${PROG}: $(OBJS) $(DPADD) CPPFLAGS+=-DLOADADDR=$(LOADADDR) -DLINKADDR=$(LINKADDR) -DBOOTMAGIC=$(BOOTMAGIC) CPPFLAGS+=${DEBUGFLAGS} +CFLAGS+=${NOPIE_FLAGS} #AFLAGS+=-Wa,-a +AFLAGS+=${NOPIE_FLAGS} .else NOPROG= .endif diff --git a/sys/arch/i386/stand/boot/Makefile b/sys/arch/i386/stand/boot/Makefile index 277b0eb7e17..cafad2f16c9 100644 --- a/sys/arch/i386/stand/boot/Makefile +++ b/sys/arch/i386/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.36 2011/11/06 13:39:43 jsing Exp $ +# $OpenBSD: Makefile,v 1.37 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -67,5 +67,7 @@ CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -DLINKADDR=${LINKADDR} CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD +CFLAGS+=${NOPIE_FLAGS} AFLAGS+=-m32 # -Wa,-R # AFLAGS+=-Wa,-a +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/i386/stand/cdboot/Makefile b/sys/arch/i386/stand/cdboot/Makefile index 97912f9cb1c..94b663c40ae 100644 --- a/sys/arch/i386/stand/cdboot/Makefile +++ b/sys/arch/i386/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2010/07/10 17:09:15 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -48,5 +48,7 @@ CPPFLAGS+=-DLINKADDR=${LINKADDR} CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD CFLAGS+=-DOSREV=\"${OSREV}\" -DMACHINE=\"${MACHINE}\" CFLAGS+=-DKERNEL=\"/${OSREV}/${MACHINE}/bsd.rd\" +CFLAGS+=${NOPIE_FLAGS} #AFLAGS+=-Wa,-R # AFLAGS+=-Wa,-a +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/i386/stand/cdbr/Makefile b/sys/arch/i386/stand/cdbr/Makefile index 468e58aa8f4..ae0757e2e32 100644 --- a/sys/arch/i386/stand/cdbr/Makefile +++ b/sys/arch/i386/stand/cdbr/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2004/08/24 15:24:05 tom Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:18 pascal Exp $ # PROG= cdbr @@ -6,6 +6,7 @@ SRCS= cdbr.S AFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a AFLAGS+=-DOSREV=\"${OSREV}\" AFLAGS+=-DMACH=\"${MACHINE}\" -DMACH_U=\"${MACHINE:U}\" +AFLAGS+=${NOPIE_FLAGS} LD=ld ORG= 0x0000 LDFLAGS=-nostdlib -Ttext ${ORG} -x -N -s -Bstatic -e start diff --git a/sys/arch/i386/stand/etc/Makefile b/sys/arch/i386/stand/etc/Makefile index 3f4a565455d..444592b8477 100644 --- a/sys/arch/i386/stand/etc/Makefile +++ b/sys/arch/i386/stand/etc/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.9 1998/05/28 20:52:37 mickey Exp $ +# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:18 pascal Exp $ S= ${.CURDIR}/../../../.. I386= ${.CURDIR}/../.. +NOPIE= + all depend:: assym.h assym.h: $S/kern/genassym.sh ${.CURDIR}/genassym.cf diff --git a/sys/arch/i386/stand/libsa/Makefile b/sys/arch/i386/stand/libsa/Makefile index edff079b1f6..ec1d45d794a 100644 --- a/sys/arch/i386/stand/libsa/Makefile +++ b/sys/arch/i386/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.47 2007/05/30 01:25:43 tom Exp $ +# $OpenBSD: Makefile,v 1.48 2012/08/21 14:46:18 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -47,6 +47,7 @@ SRCS+= debug.c NOPROFILE=noprofile NOPIC=nopic +NOPIE= .PATH: $S/lib/libsa diff --git a/sys/arch/i386/stand/libz/Makefile b/sys/arch/i386/stand/libz/Makefile index 525c7141bf2..2503a62a549 100644 --- a/sys/arch/i386/stand/libz/Makefile +++ b/sys/arch/i386/stand/libz/Makefile @@ -1,10 +1,12 @@ -# $OpenBSD: Makefile,v 1.11 2003/12/18 02:27:13 millert Exp $ +# $OpenBSD: Makefile,v 1.12 2012/08/21 14:46:18 pascal Exp $ # $NetBSD: Makefile,v 1.2 1997/01/22 01:36:30 cgd Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} SADIR=${.CURDIR}/.. +NOPIE= + .PATH: ${S}/lib/libz .include "${S}/lib/libz/Makefile" diff --git a/sys/arch/i386/stand/mbr/Makefile b/sys/arch/i386/stand/mbr/Makefile index f69b5c19828..60ec96c73aa 100644 --- a/sys/arch/i386/stand/mbr/Makefile +++ b/sys/arch/i386/stand/mbr/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.14 2003/04/17 03:43:19 drahn Exp $ +# $OpenBSD: Makefile,v 1.15 2012/08/21 14:46:18 pascal Exp $ # PROG= mbr SRCS= mbr.S AFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a +AFLAGS+=${NOPIE_FLAGS} LD=ld LDFLAGS=-nostdlib -Ttext 0 -x -N -s -Bstatic -e start diff --git a/sys/arch/i386/stand/pxeboot/Makefile b/sys/arch/i386/stand/pxeboot/Makefile index cc03b319b58..db948d380eb 100644 --- a/sys/arch/i386/stand/pxeboot/Makefile +++ b/sys/arch/i386/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2010/07/10 17:04:22 deraadt Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:19 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -46,5 +46,7 @@ NOPROG= CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} CPPFLAGS+=-DLINKADDR=${LINKADDR} CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD +CFLAGS+=${NOPIE_FLAGS} #AFLAGS+=-Wa,-R # AFLAGS+=-Wa,-a +AFLAGS+=${NOPIE_FLAGS} diff --git a/sys/arch/landisk/stand/boot/Makefile b/sys/arch/landisk/stand/boot/Makefile index 2bc06c5d817..27d16d3c868 100644 --- a/sys/arch/landisk/stand/boot/Makefile +++ b/sys/arch/landisk/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2008/05/28 21:16:43 miod Exp $ +# $OpenBSD: Makefile,v 1.7 2012/08/21 14:46:19 pascal Exp $ MAN= boot.8 MLINKS= boot.8 boot.conf.5 @@ -7,6 +7,7 @@ MLINKS= boot.8 boot.conf.5 PROG= boot SRCS= srt0.S conf.c devs.c getsecs.c scifcons.c delay.c LDFLAGS=-nostdlib -Ttext 0x8ff00000 -N -x -Bstatic -e start +NOPIE= OBJCOPY?=objcopy INSTALL_STRIP= diff --git a/sys/arch/landisk/stand/mbr/Makefile b/sys/arch/landisk/stand/mbr/Makefile index 4ea898a5872..d3eab826e33 100644 --- a/sys/arch/landisk/stand/mbr/Makefile +++ b/sys/arch/landisk/stand/mbr/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2006/10/06 22:06:46 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:19 pascal Exp $ .include <bsd.own.mk> @@ -9,6 +9,7 @@ PROG= mbr SRCS= mbr.S AFLAGS+=-nostdinc -I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../.. #-Wa,a LDFLAGS+=-N -e start -Ttext 0x8c200200 +NOPIE= OBJCOPY?=objcopy INSTALL_STRIP= diff --git a/sys/arch/landisk/stand/xxboot/Makefile b/sys/arch/landisk/stand/xxboot/Makefile index 83055ec07cd..c0ba0e5e73f 100644 --- a/sys/arch/landisk/stand/xxboot/Makefile +++ b/sys/arch/landisk/stand/xxboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2007/11/25 18:25:32 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 2012/08/21 14:46:19 pascal Exp $ MAN= xxboot.8 @@ -8,6 +8,7 @@ LINKS= ${BINDIR}/xxboot ${BINDIR}/sdboot LINKS+= ${BINDIR}/xxboot ${BINDIR}/wdboot SRCS= pbr.S xxboot.S boot1.c LDFLAGS=-nostdlib -Ttext 0x8c201000 -N -x -Bstatic -e start +NOPIE= INSTALL_STRIP= diff --git a/sys/arch/macppc/stand/boot.mac/Makefile b/sys/arch/macppc/stand/boot.mac/Makefile index 1028decc9e0..87067f83b2b 100644 --- a/sys/arch/macppc/stand/boot.mac/Makefile +++ b/sys/arch/macppc/stand/boot.mac/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2011/07/08 08:49:53 drahn Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:19 pascal Exp $ # $NetBSD: Makefile,v 1.1 1996/09/30 16:35:05 ws Exp $ S= ${.CURDIR}/../../../.. @@ -16,6 +16,7 @@ BINDIR= /usr/mdec OBJCOPY?= objcopy OBJCOPY_ARGS= -O aixcoff-rs6000 -R .comment -R .note LDFLAGS= -X -Ttext ${RELOC} -e $(ENTRY) -T ${.CURDIR}/elf32_powerpc_merge.x -Bstatic +NOPIE= .PATH: ${S}/stand/boot .PATH: ${S}/lib/libsa diff --git a/sys/arch/macppc/stand/mbr/Makefile b/sys/arch/macppc/stand/mbr/Makefile index 6e2dd07950d..8fbe60b288c 100644 --- a/sys/arch/macppc/stand/mbr/Makefile +++ b/sys/arch/macppc/stand/mbr/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.1 2001/09/01 15:35:00 drahn Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:19 pascal Exp $ CLEANFILES= mbr msdos1mb.gz +NOPIE= all: mbr msdos1mb.gz diff --git a/sys/arch/macppc/stand/ofwboot/Makefile b/sys/arch/macppc/stand/ofwboot/Makefile index f477d654a0d..5aed69e93e0 100644 --- a/sys/arch/macppc/stand/ofwboot/Makefile +++ b/sys/arch/macppc/stand/ofwboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2011/07/08 08:49:53 drahn Exp $ +# $OpenBSD: Makefile,v 1.7 2012/08/21 14:46:19 pascal Exp $ # $NetBSD: Makefile,v 1.2 1997/04/17 07:46:24 thorpej Exp $ S= ${.CURDIR}/../../../.. @@ -11,6 +11,7 @@ SRCS+= boot.c conf.c cmd.c vars.c ctime.c strtol.c SRCS+= ofwmagic.S #CFLAGS+= -DDEBUG -DNETIF_DEBUG NOMAN= +NOPIE= STRIPFLAG= BINMODE= 444 OBJCOPY?= objcopy diff --git a/sys/arch/macppc/stand/tbxidata/Makefile b/sys/arch/macppc/stand/tbxidata/Makefile index f966360d394..b87e3ffc007 100644 --- a/sys/arch/macppc/stand/tbxidata/Makefile +++ b/sys/arch/macppc/stand/tbxidata/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.1 2001/10/03 17:10:06 drahn Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:19 pascal Exp $ NOMACHINE= FILES= bsd.tbxi NOOBJ= noobj +NOPIE= install: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \ diff --git a/sys/arch/mvme68k/stand/bootsd/Makefile b/sys/arch/mvme68k/stand/bootsd/Makefile index 379d95b01ba..982201bd85a 100644 --- a/sys/arch/mvme68k/stand/bootsd/Makefile +++ b/sys/arch/mvme68k/stand/bootsd/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.16 2006/01/10 07:36:31 miod Exp $ +# $OpenBSD: Makefile,v 1.17 2012/08/21 14:46:19 pascal Exp $ S= ${.CURDIR}/../../../.. DEFS= @@ -7,6 +7,7 @@ INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS+=-O2 ${INCPATH} ${DEFS} ${COPTS} LDFLAGS=-N -T ${STAGE2_RELOC} +NOPIE= CLEANFILES+=bootsd .include "${S}/arch/mvme68k/stand/bugcrt/Makefile.inc" diff --git a/sys/arch/mvme68k/stand/bootst/Makefile b/sys/arch/mvme68k/stand/bootst/Makefile index 3167ba77f01..906d1d50478 100644 --- a/sys/arch/mvme68k/stand/bootst/Makefile +++ b/sys/arch/mvme68k/stand/bootst/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.12 2006/01/10 07:36:32 miod Exp $ +# $OpenBSD: Makefile,v 1.13 2012/08/21 14:46:19 pascal Exp $ SIZE?= size @@ -8,6 +8,7 @@ DEFS= INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS+=-O2 ${INCPATH} ${DEFS} ${COPTS} +NOPIE= CLEANFILES+=stboot bootst bootst.bug .include "${S}/arch/mvme68k/stand/wrtvid/Makefile.inc" diff --git a/sys/arch/mvme68k/stand/bootxx/Makefile b/sys/arch/mvme68k/stand/bootxx/Makefile index 59d34eba02a..367fe3aa7ce 100644 --- a/sys/arch/mvme68k/stand/bootxx/Makefile +++ b/sys/arch/mvme68k/stand/bootxx/Makefile @@ -1,11 +1,12 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.8 2006/01/10 07:36:32 miod Exp $ +# $OpenBSD: Makefile,v 1.9 2012/08/21 14:46:19 pascal Exp $ S= ${.CURDIR}/../../../.. DEFS= INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS+=-O2 ${INCPATH} ${DEFS} ${COPTS} +NOPIE= CLEANFILES+=bootxx .include "${S}/arch/mvme68k/stand/bugcrt/Makefile.inc" diff --git a/sys/arch/mvme68k/stand/bugcrt/Makefile b/sys/arch/mvme68k/stand/bugcrt/Makefile index fc2c517ead0..ca3b4a16be4 100644 --- a/sys/arch/mvme68k/stand/bugcrt/Makefile +++ b/sys/arch/mvme68k/stand/bugcrt/Makefile @@ -1,10 +1,11 @@ -# $OpenBSD: Makefile,v 1.8 2007/10/30 06:03:14 deraadt Exp $ +# $OpenBSD: Makefile,v 1.9 2012/08/21 14:46:19 pascal Exp $ # # DO NOT OPTMIZE bugcrt (i.e. no "-O2") # S=${.CURDIR}/../../../.. CFLAGS=-I${.CURDIR}/../../include -I${.CURDIR}/../libbug -I${S}/lib/libsa \ -fomit-frame-pointer +NOPIE= OBJS=bugcrt.o diff --git a/sys/arch/mvme68k/stand/libbug/Makefile b/sys/arch/mvme68k/stand/libbug/Makefile index e3c23d04011..7a7bfcf411a 100644 --- a/sys/arch/mvme68k/stand/libbug/Makefile +++ b/sys/arch/mvme68k/stand/libbug/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.5 1996/05/16 02:25:39 chuck Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:19 pascal Exp $ LIB=bug NOPIC= NOPROFILE= +NOPIE= S=${.CURDIR}/../../../.. DIR_SA=$S/lib/libsa diff --git a/sys/arch/mvme68k/stand/libsa/Makefile b/sys/arch/mvme68k/stand/libsa/Makefile index 65a5190e4a4..97edc04ff9e 100644 --- a/sys/arch/mvme68k/stand/libsa/Makefile +++ b/sys/arch/mvme68k/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.21 2008/03/11 20:07:53 deraadt Exp $ +# $OpenBSD: Makefile,v 1.22 2012/08/21 14:46:19 pascal Exp $ LIB=sa @@ -6,6 +6,7 @@ CLEANFILES+=SRT0.o NOPIC=nopic NOPROFILE=noprofile +NOPIE= # Logically src/sys S=${.CURDIR}/../../../.. diff --git a/sys/arch/mvme68k/stand/libz/Makefile b/sys/arch/mvme68k/stand/libz/Makefile index 1e60765d790..58559723b2a 100644 --- a/sys/arch/mvme68k/stand/libz/Makefile +++ b/sys/arch/mvme68k/stand/libz/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.1 1997/04/22 16:13:42 gvf Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:19 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} +NOPIE= .PATH: ${S}/lib/libz diff --git a/sys/arch/mvme68k/stand/netboot/Makefile b/sys/arch/mvme68k/stand/netboot/Makefile index 473badbaf03..deac2566471 100644 --- a/sys/arch/mvme68k/stand/netboot/Makefile +++ b/sys/arch/mvme68k/stand/netboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2009/02/17 18:42:06 miod Exp $ +# $OpenBSD: Makefile,v 1.16 2012/08/21 14:46:19 pascal Exp $ SIZE?= size @@ -20,6 +20,7 @@ SRCS+= if_ie.c if_le.c OBJS= ${SRCS:S/.c/.o/g} LIBS= ${LIBSA} ${LIBBUG} ${LIBZ} LDFLAGS+= -nostdlib -s -N -T ${STAGE2_RELOC} +NOPIE= all: netboot.bin diff --git a/sys/arch/mvme68k/stand/prtvid/Makefile b/sys/arch/mvme68k/stand/prtvid/Makefile index 67ceebda479..73edc4e6922 100644 --- a/sys/arch/mvme68k/stand/prtvid/Makefile +++ b/sys/arch/mvme68k/stand/prtvid/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 1996/04/28 10:49:28 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:19 pascal Exp $ PROG= prtvid NOMAN= +NOPIE= install: diff --git a/sys/arch/mvme68k/stand/sboot/Makefile b/sys/arch/mvme68k/stand/sboot/Makefile index e606ec8161e..181391c954d 100644 --- a/sys/arch/mvme68k/stand/sboot/Makefile +++ b/sys/arch/mvme68k/stand/sboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2005/08/03 00:16:02 millert Exp $ +# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:19 pascal Exp $ S= ${.CURDIR}/../../../.. INCL?= -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S} @@ -15,6 +15,7 @@ LIBS= ${LIBSA} ${LIBBUG} ${LIBZ} LDFLAGS= -N -s -static CLEANFILES+=XBUG.o XSRT0.o oc_cksum.o sboot.tmp rboot.tmp srec sboot rboot MDEC_DIR?=/usr/mdec +NOPIE= all: sboot rboot diff --git a/sys/arch/mvme68k/stand/wrtvid/Makefile b/sys/arch/mvme68k/stand/wrtvid/Makefile index 2cbd2a08407..f5146f834cb 100644 --- a/sys/arch/mvme68k/stand/wrtvid/Makefile +++ b/sys/arch/mvme68k/stand/wrtvid/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.2 1996/04/28 10:49:47 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:19 pascal Exp $ PROG= wrtvid NOMAN= +NOPIE= install: diff --git a/sys/arch/mvme88k/stand/bootsd/Makefile b/sys/arch/mvme88k/stand/bootsd/Makefile index 665a880f398..f739a0e7d30 100644 --- a/sys/arch/mvme88k/stand/bootsd/Makefile +++ b/sys/arch/mvme88k/stand/bootsd/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.14 2008/04/02 21:53:17 miod Exp $ +# $OpenBSD: Makefile,v 1.15 2012/08/21 14:46:19 pascal Exp $ S= ${.CURDIR}/../../../.. DEFS= @@ -7,6 +7,7 @@ INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS+=${INCPATH} ${DEFS} ${COPTS} LDFLAGS=-N -T ${STAGE2_RELOC} +NOPIE= CLEANFILES+=bootsd .include "${S}/arch/mvme88k/stand/bugcrt/Makefile.inc" diff --git a/sys/arch/mvme88k/stand/bootst/Makefile b/sys/arch/mvme88k/stand/bootst/Makefile index d7463654b2a..b068fd58ad0 100644 --- a/sys/arch/mvme88k/stand/bootst/Makefile +++ b/sys/arch/mvme88k/stand/bootst/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.13 2008/04/02 21:53:17 miod Exp $ +# $OpenBSD: Makefile,v 1.14 2012/08/21 14:46:19 pascal Exp $ SIZE?= size @@ -9,6 +9,7 @@ INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS+=${INCPATH} ${DEFS} ${COPTS} LDFLAGS=-s -N -T ${STAGE2_RELOC} +NOPIE= CLEANFILES+=stboot bootst bootst.bug .include "${S}/arch/mvme88k/stand/wrtvid/Makefile.inc" diff --git a/sys/arch/mvme88k/stand/bootxx/Makefile b/sys/arch/mvme88k/stand/bootxx/Makefile index 7537fd4569c..ceecab48be1 100644 --- a/sys/arch/mvme88k/stand/bootxx/Makefile +++ b/sys/arch/mvme88k/stand/bootxx/Makefile @@ -1,11 +1,12 @@ # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 -# $OpenBSD: Makefile,v 1.13 2008/09/19 20:18:03 miod Exp $ +# $OpenBSD: Makefile,v 1.14 2012/08/21 14:46:19 pascal Exp $ S= ${.CURDIR}/../../../.. DEFS=-DSTAGE2_RELOC=${STAGE2_RELOC} INCPATH=-I${.CURDIR} -I${.CURDIR}/../libsa -I${.CURDIR}/../libbug \ -I${.CURDIR}/../../include -I${S} -I${S}/lib/libsa CFLAGS+=${INCPATH} ${DEFS} ${COPTS} +NOPIE= CLEANFILES+=bootxx .include "${S}/arch/mvme88k/stand/bugcrt/Makefile.inc" diff --git a/sys/arch/mvme88k/stand/bugcrt/Makefile b/sys/arch/mvme88k/stand/bugcrt/Makefile index 65216c4afa1..e9e12d2b1ab 100644 --- a/sys/arch/mvme88k/stand/bugcrt/Makefile +++ b/sys/arch/mvme88k/stand/bugcrt/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2008/04/02 21:53:17 miod Exp $ +# $OpenBSD: Makefile,v 1.13 2012/08/21 14:46:19 pascal Exp $ S=${.CURDIR}/../../../.. @@ -8,6 +8,7 @@ STAGE2_CFLAGS=-DSTAGE2 NETBOOT_CFLAGS=-DNETBOOT SRCS=crt0.S OBJS=stage1crt.o stage2crt.o netcrt.o +NOPIE= CLEANFILES+=stage1crt.out stage2crt.out netcrt.out ${OBJS} diff --git a/sys/arch/mvme88k/stand/libbug/Makefile b/sys/arch/mvme88k/stand/libbug/Makefile index 80cdefcb9e6..7d247a24b3e 100644 --- a/sys/arch/mvme88k/stand/libbug/Makefile +++ b/sys/arch/mvme88k/stand/libbug/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.7 2004/01/26 19:48:33 miod Exp $ +# $OpenBSD: Makefile,v 1.8 2012/08/21 14:46:19 pascal Exp $ LIB=bug NOPIC= NOPROFILE= +NOPIE= S=${.CURDIR}/../../../.. DIR_SA=$S/lib/libsa diff --git a/sys/arch/mvme88k/stand/libsa/Makefile b/sys/arch/mvme88k/stand/libsa/Makefile index 6bcefbb145c..efd16b1f73f 100644 --- a/sys/arch/mvme88k/stand/libsa/Makefile +++ b/sys/arch/mvme88k/stand/libsa/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.13 2008/09/19 20:18:03 miod Exp $ +# $OpenBSD: Makefile,v 1.14 2012/08/21 14:46:19 pascal Exp $ LIB=sa NOPIC=nopic NOPROFILE=noprofile +NOPIE= # Logically src/sys S=${.CURDIR}/../../../.. diff --git a/sys/arch/mvme88k/stand/libz/Makefile b/sys/arch/mvme88k/stand/libz/Makefile index 6e9f98cba6a..58559723b2a 100644 --- a/sys/arch/mvme88k/stand/libz/Makefile +++ b/sys/arch/mvme88k/stand/libz/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.1 1998/08/22 06:39:14 smurph Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:19 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} +NOPIE= .PATH: ${S}/lib/libz diff --git a/sys/arch/mvme88k/stand/netboot/Makefile b/sys/arch/mvme88k/stand/netboot/Makefile index 1ea61e75291..32213d415e9 100644 --- a/sys/arch/mvme88k/stand/netboot/Makefile +++ b/sys/arch/mvme88k/stand/netboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2008/04/02 21:53:18 miod Exp $ +# $OpenBSD: Makefile,v 1.16 2012/08/21 14:46:19 pascal Exp $ SIZE?= size STRIP?= strip @@ -22,6 +22,7 @@ SRCS+= if_ie.c OBJS= ${SRCS:S/.c/.o/g} LIBS= ${LIBSA} ${LIBBUG} ${LIBZ} LDFLAGS+= -s -N -T ${STAGE2_RELOC} +NOPIE= all: netboot.bin diff --git a/sys/arch/mvme88k/stand/prtvid/Makefile b/sys/arch/mvme88k/stand/prtvid/Makefile index 4357d948db1..cc586e89c83 100644 --- a/sys/arch/mvme88k/stand/prtvid/Makefile +++ b/sys/arch/mvme88k/stand/prtvid/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.3 2006/05/16 22:52:26 miod Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:19 pascal Exp $ PROG= prtvid NOMAN= +NOPIE= install: diff --git a/sys/arch/mvme88k/stand/sboot/Makefile b/sys/arch/mvme88k/stand/sboot/Makefile index 20554c2a17c..76536e1f125 100644 --- a/sys/arch/mvme88k/stand/sboot/Makefile +++ b/sys/arch/mvme88k/stand/sboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2005/09/11 13:36:00 deraadt Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:19 pascal Exp $ S= ${.CURDIR}/../../../.. INCL?= -I${.CURDIR} -I${.CURDIR}/../libsa -I${S}/lib/libsa -I${S} @@ -11,6 +11,7 @@ SRCS= sboot.c clock.c etherfun.c if_le.c OBJS= ${SRCS:S/.c/.o/g} CLEANFILES+=XBUG.o XSRT0.o oc_cksum.o sboot.tmp rboot.tmp srec sboot rboot MDEC_DIR?=/usr/mdec +NOPIE= all: sboot rboot diff --git a/sys/arch/mvme88k/stand/tftpboot/Makefile b/sys/arch/mvme88k/stand/tftpboot/Makefile index 7e245d09012..34ec6344faa 100644 --- a/sys/arch/mvme88k/stand/tftpboot/Makefile +++ b/sys/arch/mvme88k/stand/tftpboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2008/04/02 21:53:18 miod Exp $ +# $OpenBSD: Makefile,v 1.5 2012/08/21 14:46:19 pascal Exp $ SIZE?= size STRIP?= strip @@ -20,6 +20,7 @@ SRCS= boot.c conf.c version.c tftpfs.c netdev.c OBJS= ${SRCS:S/.c/.o/g} LIBS= ${LIBSA} ${LIBBUG} ${LIBZ} LDFLAGS+= -s -N -T ${STAGE2_RELOC} +NOPIE= all: tftpboot.bin diff --git a/sys/arch/mvme88k/stand/wrtvid/Makefile b/sys/arch/mvme88k/stand/wrtvid/Makefile index b5ef37617d8..0aaaf4b10c1 100644 --- a/sys/arch/mvme88k/stand/wrtvid/Makefile +++ b/sys/arch/mvme88k/stand/wrtvid/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.3 2006/05/16 22:52:26 miod Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:19 pascal Exp $ PROG= wrtvid NOMAN= +NOPIE= install: diff --git a/sys/arch/sgi/stand/Makefile.inc b/sys/arch/sgi/stand/Makefile.inc index 063028b4dcd..feb3616b0a9 100644 --- a/sys/arch/sgi/stand/Makefile.inc +++ b/sys/arch/sgi/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.7 2011/03/18 06:21:40 matthew Exp $ +# $OpenBSD: Makefile.inc,v 1.8 2012/08/21 14:46:19 pascal Exp $ # $NetBSD: Makefile.inc,v 1.7 2000/08/20 14:57:16 mrg Exp $ .ifndef __INCLUDED_STAND_MAKEFILE_INC @@ -19,8 +19,13 @@ SAABI?= -mips3 -mno-abicalls -G 0 -fno-pic -fno-common AS?= as LD?= ld LIBSA_CPPFLAGS?= -DNEEDS_HEAP_H +.else +AFLAGS+= ${NOPIE_FLAGS} +CFLAGS+= ${NOPIE_FLAGS} .endif +CFLAGS+= ${NOPIE_FLAGS} + ### Figure out what to use for libsa LIBSADIR?= ${.CURDIR}/../libsa diff --git a/sys/arch/sgi/stand/boot/Makefile b/sys/arch/sgi/stand/boot/Makefile index 8b7eb7d8384..32be11981f7 100644 --- a/sys/arch/sgi/stand/boot/Makefile +++ b/sys/arch/sgi/stand/boot/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.13 2012/03/29 20:22:18 miod Exp $ +# $OpenBSD: Makefile,v 1.14 2012/08/21 14:46:19 pascal Exp $ NOMAN= noman +NOPIE= CFLAGS+= ${SAABI} -mno-abicalls -D_NO_ABICALLS -nostdinc -D__sgi__ \ -I${.CURDIR}/../include -I${.CURDIR}/../../../.. \ diff --git a/sys/arch/sgi/stand/libsa/Makefile b/sys/arch/sgi/stand/libsa/Makefile index ff6cb0acbb4..dc04b0cb3dc 100644 --- a/sys/arch/sgi/stand/libsa/Makefile +++ b/sys/arch/sgi/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2009/05/14 18:57:43 miod Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:19 pascal Exp $ LIB= sa @@ -30,6 +30,7 @@ ${OBJS}: ${.CURDIR}/../Makefile.inc NOPROFILE= NOPIC= +NOPIE= .if !make(libdep) && !make(sadep) && !make(salibdir) && !make(obj) .BEGIN: diff --git a/sys/arch/sgi/stand/libz/Makefile b/sys/arch/sgi/stand/libz/Makefile index b80d1b5989d..93de210f64b 100644 --- a/sys/arch/sgi/stand/libz/Makefile +++ b/sys/arch/sgi/stand/libz/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 2009/05/14 18:57:43 miod Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:19 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} +NOPIE= + .PATH: ${S}/lib/libz .include "${S}/lib/libz/Makefile" diff --git a/sys/arch/socppc/stand/boot/Makefile b/sys/arch/socppc/stand/boot/Makefile index 6799370bc3d..098bf5e951a 100644 --- a/sys/arch/socppc/stand/boot/Makefile +++ b/sys/arch/socppc/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2011/07/10 16:23:50 deraadt Exp $ +# $OpenBSD: Makefile,v 1.12 2012/08/21 14:46:19 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -45,6 +45,7 @@ STANDIR= ${.CURDIR}/.. RELOC= 0x100000 LDFLAGS= -Ttext ${RELOC} +NOPIE= OBJCOPY?= objcopy ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} diff --git a/sys/arch/socppc/stand/mkboot/Makefile b/sys/arch/socppc/stand/mkboot/Makefile index c3e4e1b8e11..dd2a00f7c5f 100644 --- a/sys/arch/socppc/stand/mkboot/Makefile +++ b/sys/arch/socppc/stand/mkboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2008/06/09 15:01:56 deraadt Exp $ +# $OpenBSD: Makefile,v 1.3 2012/08/21 14:46:19 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -8,6 +8,7 @@ MAN= mkboot.8 PROG= mkboot DPADD= ${LIBZ} LDADD= -lz +NOPIE= .else NOPROG= .endif diff --git a/sys/arch/sparc/stand/binstall/Makefile b/sys/arch/sparc/stand/binstall/Makefile index e38d19858cd..e26cf4740c5 100644 --- a/sys/arch/sparc/stand/binstall/Makefile +++ b/sys/arch/sparc/stand/binstall/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.1 1997/09/17 10:46:13 downsj Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:19 pascal Exp $ NOMAN= noman +NOPIE= beforeinstall: ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/sys/arch/sparc/stand/boot/Makefile b/sys/arch/sparc/stand/boot/Makefile index 551cba331fa..444b355de17 100644 --- a/sys/arch/sparc/stand/boot/Makefile +++ b/sys/arch/sparc/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2010/06/29 21:33:54 miod Exp $ +# $OpenBSD: Makefile,v 1.18 2012/08/21 14:46:19 pascal Exp $ # $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ PROG= boot @@ -20,6 +20,7 @@ CFLAGS= -O2 -I${.CURDIR}/../common -I${.CURDIR}/../../../../arch \ CLEANFILES+=${PROG}.aout ${PROG}.elf elfclean LIBS=${LIBSA} ${LIBZ} +NOPIE= elfclean: clean-elf.c ${HOSTCC} -o elfclean ${.ALLSRC} diff --git a/sys/arch/sparc/stand/bootxx/Makefile b/sys/arch/sparc/stand/bootxx/Makefile index 359504f3d16..1114c186264 100644 --- a/sys/arch/sparc/stand/bootxx/Makefile +++ b/sys/arch/sparc/stand/bootxx/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2007/11/25 18:25:33 deraadt Exp $ +# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:19 pascal Exp $ # $NetBSD: Makefile,v 1.2 1995/09/30 21:43:38 pk Exp $ .PATH: ${.CURDIR}/../common @@ -6,6 +6,7 @@ PROG= bootxx NOMAN= noman +NOPIE= INSTALL_STRIP= S= ${.CURDIR}/../../../.. diff --git a/sys/arch/sparc/stand/libsa/Makefile b/sys/arch/sparc/stand/libsa/Makefile index 44356215b10..040a31419f8 100644 --- a/sys/arch/sparc/stand/libsa/Makefile +++ b/sys/arch/sparc/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2010/06/29 21:33:54 miod Exp $ +# $OpenBSD: Makefile,v 1.6 2012/08/21 14:46:19 pascal Exp $ LIB= sa @@ -30,6 +30,7 @@ ${OBJS}: ${.CURDIR}/../Makefile.inc NOPROFILE= NOPIC= +NOPIE= install: diff --git a/sys/arch/sparc/stand/libz/Makefile b/sys/arch/sparc/stand/libz/Makefile index cd87356eb21..9c41c7d4d0f 100644 --- a/sys/arch/sparc/stand/libz/Makefile +++ b/sys/arch/sparc/stand/libz/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.3 2003/12/17 05:01:06 millert Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:19 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} +NOPIE= .PATH: ${S}/lib/libz diff --git a/sys/arch/sparc64/stand/bootblk/Makefile b/sys/arch/sparc64/stand/bootblk/Makefile index f0a8c095059..a0471a6f448 100644 --- a/sys/arch/sparc64/stand/bootblk/Makefile +++ b/sys/arch/sparc64/stand/bootblk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2007/11/26 10:26:03 deraadt Exp $ +# $OpenBSD: Makefile,v 1.8 2012/08/21 14:46:19 pascal Exp $ # $NetBSD: Makefile,v 1.1 2000/08/20 14:58:45 mrg Exp $ CURDIR= ${.CURDIR} @@ -26,6 +26,7 @@ SVR4=-U__SVR4 -U__svr4__ -D__NetBSD__ INCLUDES= -I. -I$S/arch -I$S -nostdinc CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM ${SVR4} +NOPIE= .if !make(libdep) && !make(sadep) && !make(salibdir) && !make(obj) .BEGIN: diff --git a/sys/arch/sparc64/stand/libsa/Makefile b/sys/arch/sparc64/stand/libsa/Makefile index a0a196a9cb8..2ad82959460 100644 --- a/sys/arch/sparc64/stand/libsa/Makefile +++ b/sys/arch/sparc64/stand/libsa/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2007/11/26 10:26:03 deraadt Exp $ +# $OpenBSD: Makefile,v 1.7 2012/08/21 14:46:20 pascal Exp $ LIB= sa @@ -35,6 +35,7 @@ ${OBJS}: ${.CURDIR}/../Makefile.inc NOPROFILE= NOPIC= +NOPIE= .if !make(libdep) && !make(sadep) && !make(salibdir) && !make(obj) .BEGIN: diff --git a/sys/arch/sparc64/stand/libz/Makefile b/sys/arch/sparc64/stand/libz/Makefile index 497064d1634..efb19f2559e 100644 --- a/sys/arch/sparc64/stand/libz/Makefile +++ b/sys/arch/sparc64/stand/libz/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.6 2003/12/17 05:17:07 millert Exp $ +# $OpenBSD: Makefile,v 1.7 2012/08/21 14:46:20 pascal Exp $ S=${.CURDIR}/../../../.. ZDST=${.OBJDIR} +NOPIE= .PATH: ${S}/lib/libz diff --git a/sys/arch/sparc64/stand/ofwboot.net/Makefile b/sys/arch/sparc64/stand/ofwboot.net/Makefile index d2199beee95..748bae7e080 100644 --- a/sys/arch/sparc64/stand/ofwboot.net/Makefile +++ b/sys/arch/sparc64/stand/ofwboot.net/Makefile @@ -1,7 +1,8 @@ -# $OpenBSD: Makefile,v 1.1 2001/08/18 16:31:53 jason Exp $ +# $OpenBSD: Makefile,v 1.2 2012/08/21 14:46:20 pascal Exp $ CPPFLAGS+= -DNETBOOT PROG= ofwboot.net +NOPIE= .include "../ofwboot/Makefile" .PATH: ${.CURDIR}/../ofwboot diff --git a/sys/arch/sparc64/stand/ofwboot/Makefile b/sys/arch/sparc64/stand/ofwboot/Makefile index 16212eee795..1cd420bc382 100644 --- a/sys/arch/sparc64/stand/ofwboot/Makefile +++ b/sys/arch/sparc64/stand/ofwboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.16 2010/08/25 12:53:38 jsing Exp $ +# $OpenBSD: Makefile,v 1.17 2012/08/21 14:46:20 pascal Exp $ # $NetBSD: Makefile,v 1.2 2001/03/04 14:50:05 mrg Exp $ CURDIR= ${.CURDIR} @@ -26,6 +26,7 @@ AFLAGS+= -x assembler-with-cpp -D_LOCORE -D__ELF__ CFLAGS+= ${COPTS} CPPFLAGS+= -D_STANDALONE -DSUN4U -nostdinc #CPPFLAGS+= -DNETIF_DEBUG +NOPIE= BINMODE= 444 diff --git a/sys/arch/vax/stand/boot/Makefile b/sys/arch/vax/stand/boot/Makefile index 0463c1dfe6e..85237404e86 100644 --- a/sys/arch/vax/stand/boot/Makefile +++ b/sys/arch/vax/stand/boot/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.9 2011/07/06 18:32:59 miod Exp $ +# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:20 pascal Exp $ # $NetBSD: Makefile,v 1.27 2002/04/07 07:00:25 matt Exp $ S!= cd ${.CURDIR}/../../../../; pwd NOMAN= # defined +NOPIE= .include <bsd.own.mk> diff --git a/sys/arch/vax/stand/xxboot/Makefile b/sys/arch/vax/stand/xxboot/Makefile index 33b400b52cb..793c4a86db4 100644 --- a/sys/arch/vax/stand/xxboot/Makefile +++ b/sys/arch/vax/stand/xxboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2011/09/29 18:02:41 miod Exp $ +# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:20 pascal Exp $ # $NetBSD: Makefile,v 1.12 2002/02/24 01:04:25 matt Exp $ S= ${.CURDIR}/../../../../ @@ -20,6 +20,7 @@ CPPFLAGS+=-D_STANDALONE -DLIBSA_NO_FD_CHECKING -DLIBSA_NO_RAW_ACCESS \ -DNEED_UFS BINDIR= /usr/mdec NOMAN= # defined +NOPIE= CFLAGS= -Os diff --git a/sys/arch/zaurus/stand/zboot/Makefile b/sys/arch/zaurus/stand/zboot/Makefile index ade914bf559..30460a411d8 100644 --- a/sys/arch/zaurus/stand/zboot/Makefile +++ b/sys/arch/zaurus/stand/zboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2007/11/26 10:26:03 deraadt Exp $ +# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:20 pascal Exp $ MAN= boot.8 MANSUBDIR=zaurus @@ -7,6 +7,7 @@ MLINKS= boot.8 boot.conf.5 .if ${MACHINE} == "zaurus" PROG= zboot LDFLAGS+=-nostdlib -Bstatic +NOPIE= INSTALL_STRIP= SRCS= crt0.c diff --git a/sys/arch/zaurus/stand/zbsdmod/Makefile b/sys/arch/zaurus/stand/zbsdmod/Makefile index dc0b010391c..e139a11c201 100644 --- a/sys/arch/zaurus/stand/zbsdmod/Makefile +++ b/sys/arch/zaurus/stand/zbsdmod/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.3 2005/11/04 01:02:31 uwe Exp $ +# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:20 pascal Exp $ OBJS= zbsdmod.o SRCS= zbsdmod.c NOMAN= +NOPIE= all: ${OBJS} |