--- /usr/portage/dev-lisp/sbcl/sbcl-1.3.14.ebuild 2017-02-10 02:01:41.000000000 +1100 +++ /usr/local/portage/dev-lisp/sbcl/sbcl-1.3.14.ebuild 2017-02-28 00:41:53.850272238 +1100 @@ -93,6 +93,11 @@ cd "${S}" } +# Returns true if gcc builds PIEs +my-gcc-specs-pie() { + gcc-specs-pie || [[ "$(gcc-major-version)" -ge 6 ]] +} + src_prepare() { eapply "${FILESDIR}"/gentoo-fix_install_man.patch # bug #468482 @@ -102,17 +107,11 @@ # bugs #560276, #561018 eapply "${FILESDIR}"/sb-posix-test-1.2.15.patch # bug #599902, #607302 - eapply "${FILESDIR}"/${PN}-1.3.14-config.patch + my-gcc-specs-pie || eapply "${FILESDIR}"/${PN}-1.3.14-config.patch eapply "${FILESDIR}"/${PN}-1.2.11-solaris.patch eapply "${FILESDIR}"/${PN}-1.2.13-verbose-build.patch - # To make the hardened compiler NOT compile with -fPIE -pie - if gcc-specs-pie ; then - einfo "Disabling PIE..." - eapply "${FILESDIR}"/${PN}-1.1.17-gentoo-fix_nopie_for_hardened_toolchain.patch - fi - eapply_user # bug #526194