summaryrefslogtreecommitdiff
path: root/sys/arch/zaurus
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-09-11 17:12:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-09-11 17:12:07 +0000
commitb93dffc57f78e9a085e82dfbffca0f7a3647612f (patch)
treebc409b908f461d48b152c4d0d187d49da93aabf4 /sys/arch/zaurus
parentd82218bfb9095c25e40d7236c456b039f3f8295b (diff)
Cope with PIE, if it is enabled. Note that this has not been completely
tested, but it is time to get it in at least.
Diffstat (limited to 'sys/arch/zaurus')
-rw-r--r--sys/arch/zaurus/stand/zboot/Makefile11
-rw-r--r--sys/arch/zaurus/stand/zbsdmod/Makefile6
2 files changed, 10 insertions, 7 deletions
diff --git a/sys/arch/zaurus/stand/zboot/Makefile b/sys/arch/zaurus/stand/zboot/Makefile
index 30460a411d8..a561e20e74f 100644
--- a/sys/arch/zaurus/stand/zboot/Makefile
+++ b/sys/arch/zaurus/stand/zboot/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.10 2012/08/21 14:46:20 pascal Exp $
+# $OpenBSD: Makefile,v 1.11 2012/09/11 17:12:05 deraadt Exp $
MAN= boot.8
MANSUBDIR=zaurus
@@ -6,8 +6,7 @@ MLINKS= boot.8 boot.conf.5
.if ${MACHINE} == "zaurus"
PROG= zboot
-LDFLAGS+=-nostdlib -Bstatic
-NOPIE=
+LDFLAGS+=-nostdlib -Bstatic -nopie
INSTALL_STRIP=
SRCS= crt0.c
@@ -40,6 +39,9 @@ SRCS+= alloc.c cmd.c devopen.c diskprobe.c exec.c exit.c loadfile.c \
.PATH: ${S}/stand/boot
.PATH: ${S}/lib/libsa
+${PROG}: ${OBJS} ${LIBSA}
+ ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA}
+
.else
NOPROG=
.endif
@@ -49,4 +51,5 @@ NOPROG=
AFLAGS+=-D_LOCORE
CPPFLAGS+=-D_STANDALONE
CPPFLAGS+=-I${S}/stand/boot -I${S}/lib/libsa -I. -I${.CURDIR} -I${S}
-CFLAGS+=-fno-stack-protector -fno-builtin -fpack-struct
+CFLAGS+=-fno-stack-protector -fno-builtin -fpack-struct -fno-pie
+AFLAGS+= -fno-pie
diff --git a/sys/arch/zaurus/stand/zbsdmod/Makefile b/sys/arch/zaurus/stand/zbsdmod/Makefile
index e139a11c201..f39c9dd2ca2 100644
--- a/sys/arch/zaurus/stand/zbsdmod/Makefile
+++ b/sys/arch/zaurus/stand/zbsdmod/Makefile
@@ -1,9 +1,8 @@
-# $OpenBSD: Makefile,v 1.4 2012/08/21 14:46:20 pascal Exp $
+# $OpenBSD: Makefile,v 1.5 2012/09/11 17:12:06 deraadt Exp $
OBJS= zbsdmod.o
SRCS= zbsdmod.c
NOMAN=
-NOPIE=
all: ${OBJS}
@@ -18,4 +17,5 @@ afterinstall:
CFLAGS= -fno-stack-protector -Wall
CFLAGS+= -DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
-CPPFLAGS= -I${.CURDIR}/../include
+CPPFLAGS= -I${.CURDIR}/../include -fno-pie
+LDFLAGS+= -nopie