diff options
Diffstat (limited to 'app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild')
-rw-r--r-- | app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild index 66180e9..349e066 100644 --- a/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild +++ b/app-emulation/xen-tools/xen-tools-3.0.2-r4.ebuild @@ -81,7 +81,17 @@ src_unpack() { -i {} \; fi - # Disable the 32bit-only vmxassist, if we are not on x86 and we don't support the x86 ABI + # xen tries to be smart and filter out CFLAGs not supported by gcc. + # It's not smart enough to catch no* flags, though, so we force them. + if use hardened; then + HARDFLAGS="-nopie -fno-stack-protector -fno-stack-protector-all" + sed -e "s/CFLAGS :=/CFLAGS := ${HARDFLAGS}/" \ + -i "${S}"/tools/firmware/hvmloader/Makefile \ + "${S}"/tools/firmware/vmxassist/Makefile + fi + + # Disable the 32bit-only vmxassist if we are not on x86 + # and we don't support the x86 ABI if ! use x86 && ! has x86 $(get_all_abis); then sed -i -e "/SUBDIRS += vmxassist/d" "${S}"tools/firmware/Makefile fi @@ -93,13 +103,6 @@ src_unpack() { # Allow --as-needed LDFLAGS epatch "${FILESDIR}/${P}"--as-needed.patch - # Allow building with gcc-4.1 (bug #147876) - for FLAG in -fnopie -nopie -fno-stack-protector -fno-stack-protector-all ; - do - test-flag-CC ${FLAG} && HARDFLAGS="${HARDFLAGS} ${FLAG}" - done - sed -i "s/^CFLAGS :=$/& ${HARDFLAGS}/" "${S}"/tools/firmware/{hvmloader,vmxassist}/Makefile - # Allow building with python-2.5 (bug #149138) # Backported from upstream - should be in 3.0.3 sed -i 's/\.2|^2\.3|^2\.4/.[2345]/' "${S}"/tools/check/check_python |