xbps-src: env/hardening: make sure to put pkg overrides at the end.
This commit is contained in:
parent
784f75931d
commit
744acd0308
1 changed files with 6 additions and 6 deletions
|
@ -1,13 +1,13 @@
|
||||||
# Enable SSP and FORITFY_SOURCE=2 by default.
|
# Enable SSP and FORITFY_SOURCE=2 by default.
|
||||||
XBPS_CFLAGS+=" -fstack-protector-strong -D_FORTIFY_SOURCE=2"
|
CFLAGS=" -fstack-protector-strong -D_FORTIFY_SOURCE=2 $CFLAGS"
|
||||||
XBPS_CXXFLAGS+=" ${XBPS_CFLAGS}"
|
CXXFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 $CXXFLAGS"
|
||||||
# Enable as-needed and relro by default.
|
# Enable as-needed and relro by default.
|
||||||
XBPS_LDFLAGS+=" -Wl,--as-needed -Wl,-z,relro"
|
LDFLAGS="-Wl,--as-needed -Wl,-z,relro $LDFLAGS"
|
||||||
|
|
||||||
if [ -z "$nopie" ]; then
|
if [ -z "$nopie" ]; then
|
||||||
_GCCSPECSDIR=${XBPS_COMMONDIR}/environment/configure/gccspecs
|
_GCCSPECSDIR=${XBPS_COMMONDIR}/environment/configure/gccspecs
|
||||||
XBPS_CFLAGS+=" -specs=${_GCCSPECSDIR}/hardened-cc1"
|
CFLAGS="-specs=${_GCCSPECSDIR}/hardened-cc1 $CFLAGS"
|
||||||
XBPS_CXXFLAGS+=" -specs=${_GCCSPECSDIR}/hardened-cc1"
|
CXXFLAGS="-specs=${_GCCSPECSDIR}/hardened-cc1 $CXXFLAGS"
|
||||||
# We pass -z relro -z now here too, because libtool drops -specs...
|
# We pass -z relro -z now here too, because libtool drops -specs...
|
||||||
XBPS_LDFLAGS+=" -specs=${_GCCSPECSDIR}/hardened-ld -Wl,-z,relro -Wl,-z,now"
|
LDFLAGS="-specs=${_GCCSPECSDIR}/hardened-ld -Wl,-z,relro -Wl,-z,now $LDFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue