From e3da69248b3079d3c99313f870433674da0048e1 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 17 Aug 2015 16:53:04 +0200 Subject: [PATCH] common/environment/configure/build-pie.sh: pass -z relro -z now via $LDFLAGS for libtool to pick them up (see #2275). --- common/environment/configure/build-pie.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/environment/configure/build-pie.sh b/common/environment/configure/build-pie.sh index d083c6b7624..d71cba3c4e7 100644 --- a/common/environment/configure/build-pie.sh +++ b/common/environment/configure/build-pie.sh @@ -3,5 +3,6 @@ _GCCSPECSDIR=${XBPS_COMMONDIR}/environment/configure/gccspecs if [ -n "$build_pie" ]; then CFLAGS+=" -specs=$_GCCSPECSDIR/hardened-cc1" CXXFLAGS+=" -specs=$_GCCSPECSDIR/hardened-cc1" - LDFLAGS+=" -specs=$_GCCSPECSDIR/hardened-ld" + # We pass -z relro -z now here too, because libtool drops -specs... + LDFLAGS+=" -specs=$_GCCSPECSDIR/hardened-ld -Wl,-z,relro -Wl,-z,now" fi