vp-build/common/environment/configure/build-pie.sh

9 lines
324 B
Bash

_GCCSPECSDIR=${XBPS_COMMONDIR}/environment/configure/gccspecs
if [ -z "$nopie" ]; then
CFLAGS+=" -specs=$_GCCSPECSDIR/hardened-cc1"
CXXFLAGS+=" -specs=$_GCCSPECSDIR/hardened-cc1"
# We pass -z relro -z now here too, because libtool drops -specs...
LDFLAGS+=" -specs=$_GCCSPECSDIR/hardened-ld -Wl,-z,relro -Wl,-z,now"
fi