summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc
diff options
context:
space:
mode:
authorpascal <pascal@openbsd.org>2012-08-28 18:59:28 +0000
committerpascal <pascal@openbsd.org>2012-08-28 18:59:28 +0000
commit9622a78f2d82a6ba6ae69b32a8dc97de1d2b5596 (patch)
tree7247d81690d2730234595d0f383fe081b243206f /gnu/usr.bin/cc
parentWork around -Wbounded warning by using sizeof(x_fname), not FILNMLEN. The (diff)
downloadwireguard-openbsd-9622a78f2d82a6ba6ae69b32a8dc97de1d2b5596.tar.xz
wireguard-openbsd-9622a78f2d82a6ba6ae69b32a8dc97de1d2b5596.zip
Add support for PIE-by-default in both ld and gcc. This is a completely
different approach than the one taken in kurt@'s original diff, but deemed better after discussion and diff exchange with kettenis@ and matthew@. Lots of feedback by kettenis@ and matthew@, prodding and encouragement by deraadt@. ok kettenis@ matthew@
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r--gnu/usr.bin/cc/Makefile.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index 9ba8baae570..96a127c109c 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -1,5 +1,5 @@
# $FreeBSD: src/gnu/usr.bin/cc/Makefile.inc,v 1.66.8.1 2009/04/15 03:14:26 kensmith Exp $
-# $OpenBSD: Makefile.inc,v 1.4 2011/03/06 20:18:22 guenther Exp $
+# $OpenBSD: Makefile.inc,v 1.5 2012/08/28 18:59:28 pascal Exp $
.include "../Makefile.inc"
@@ -23,6 +23,7 @@ GCC_TARGET= ${TARGET_ARCH}-unknown-openbsd${OSREV}
CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H
CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\"
#CFLAGS+= -DWANT_COMPILER_INVARIANTS
+CFLAGS+= ${PIE_DEFAULT}
# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
# to get the proper sizes in limits.h