diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-12-23 16:35:54 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-12-23 16:35:54 +0000 |
commit | 284b6893548b59008047ca2f936aa9435ef26ba6 (patch) | |
tree | 481b405fdb88d8173f8280fa86497aef2b74e621 | |
parent | 147513372ca89148f251afd075d15f945b271ae8 (diff) |
Small changes to buil
-rw-r--r-- | share/mk/bsd.own.mk | 9 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index e916153c03c..aa8e02bd0eb 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.own.mk,v 1.150 2014/04/22 14:42:53 reyk Exp $ +# $OpenBSD: bsd.own.mk,v 1.151 2014/12/23 16:35:53 deraadt Exp $ # $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $ # Host-specific overrides @@ -25,6 +25,7 @@ BINUTILS217_ARCH=hppa64 ia64 # m88k unknown # hppa64 unknown PIE_ARCH=alpha amd64 hppa i386 mips64 mips64el powerpc sh sparc64 +STATICPIE_ARCH=amd64 .for _arch in ${MACHINE_ARCH} .if !empty(GCC3_ARCH:M${_arch}) @@ -39,6 +40,10 @@ BINUTILS_VERSION=binutils-2.17 BINUTILS_VERSION=binutils .endif +.if !empty(STATICPIE_ARCH:M${_arch}) +STATICPIE?=-pie -Wl,-Bsymbolic +.endif + .if !empty(PIE_ARCH:M${_arch}) NOPIE_FLAGS?=-fno-pie NOPIE_LDFLAGS?=-nopie @@ -118,7 +123,7 @@ INSTALL_STRIP?= -s # This may be changed for _single filesystem_ configurations (such as # routers and other embedded systems); normal systems should leave it alone! -STATIC?= -static +STATIC?= -static ${STATICPIE} # Define SYS_INCLUDE to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index cbfb3776f74..88e89f3bde1 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.prog.mk,v 1.65 2014/10/31 13:46:17 jsing Exp $ +# $OpenBSD: bsd.prog.mk,v 1.66 2014/12/23 16:35:53 deraadt Exp $ # $NetBSD: bsd.prog.mk,v 1.55 1996/04/08 21:19:26 jtc Exp $ # @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 @@ -10,7 +10,7 @@ .SUFFIXES: .out .o .c .cc .cpp .C .cxx .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 -.if defined(LDSTATIC) || defined(NOPIE) +.if (defined(LDSTATIC) && !defined(STATICPIE)) || defined(NOPIE) CFLAGS+= ${NOPIE_FLAGS} AFLAGS+= ${NOPIE_FLAGS} LDFLAGS+= ${NOPIE_LDFLAGS} |