env/hardening: reenable hardening for MIPS.

I just booted a full PIE base-system successfully on my CI20 Creator.

For now we set -fPIE again in C{,XX}FLAGS to fix the build in attr/acl/coreutils, etc.
This commit is contained in:
Juan RP 2016-04-27 12:46:08 +02:00
parent 2ec3075932
commit 7e117fb96d
1 changed files with 7 additions and 3 deletions

View File

@ -9,12 +9,16 @@ case "$XBPS_TARGET_MACHINE" in
CFLAGS+=" -fno-stack-protector"
CXXFLAGS+=" -fno-stack-protector"
;;
mips*) # PIE support broken
nopie=yes
;;
esac
if [ -z "$nopie" ]; then
case "$XBPS_TARGET_MACHINE" in
mips*)
# XXX for some reason the gcc specs does not apply correctly
CFLAGS+=" -fPIE"
CXXFLAGS+=" -fPIE"
;;
esac
_GCCSPECSDIR=${XBPS_COMMONDIR}/environment/configure/gccspecs
CFLAGS="-specs=${_GCCSPECSDIR}/hardened-cc1 $CFLAGS"
CXXFLAGS="-specs=${_GCCSPECSDIR}/hardened-cc1 $CXXFLAGS"