common/environment/configure/build-pie.sh: pass -z relro -z now via $LDFLAGS for libtool to pick them up (see #2275).

This commit is contained in:
Christian Neukirchen 2015-08-17 16:53:04 +02:00
parent c3e08be6b3
commit e3da69248b
1 changed files with 2 additions and 1 deletions

View File

@ -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