summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin F. Quinn <kevquinn@gentoo.org>2007-01-26 08:04:55 +0000
committerKevin F. Quinn <kevquinn@gentoo.org>2007-01-26 08:04:55 +0000
commit77a95ecffab08a3d6c1f6f46301ea290d63ef438 (patch)
treea68181927bcbd4f73e6bff129f520ef4faf5124a
parentFix silly error on sed in 2.5; commit a pending change to the patch (diff)
downloadkevquinn-77a95ecffab08a3d6c1f6f46301ea290d63ef438.tar.gz
kevquinn-77a95ecffab08a3d6c1f6f46301ea290d63ef438.tar.bz2
kevquinn-77a95ecffab08a3d6c1f6f46301ea290d63ef438.zip
Commit pending change, prior to move to branch
svn path=/; revision=158
-rw-r--r--hardened/toolchain/trunk/eclass/toolchain.eclass17
1 files changed, 16 insertions, 1 deletions
diff --git a/hardened/toolchain/trunk/eclass/toolchain.eclass b/hardened/toolchain/trunk/eclass/toolchain.eclass
index 3c2ca31..0d9463a 100644
--- a/hardened/toolchain/trunk/eclass/toolchain.eclass
+++ b/hardened/toolchain/trunk/eclass/toolchain.eclass
@@ -2161,6 +2161,21 @@ do_gcc_PIE_patches() {
return 0
fi
+ # New multilib approach - drop pie from specs
+ # x86 and x86_64 only for the moment
+ sed -e "s:^MULTILIB_OPTIONS = m64/m32$:MULTILIB_OPTIONS = m64/m32 fpie|fPIE:" \
+ -e 's:^MULTILIB_DIRNAMES = 64 32$:MULTILIB_DIRNAMES = 64 32 pie:' \
+ -e 's:^MULTILIB_OSDIRNAMES = ../lib64 ../lib$:MULTILIB_OSDIRNAMES = ../lib64 ../lib pie' \
+ -i "${S}"/gcc/config/i386/t-linux64 ||
+ die "Failed to fixup x86_64 configuration for hardened multilib"
+
+ printf "MULTILIB_OPTIONS = fpie|fPIE\n" >> "${S}"/gcc/config/t-linux
+ printf "MULTILIB_DIRNAMES = pie\n" >> "${S}"/gcc/config/t-linux
+ printf "MULTILIB_MATCHES = fpie=fPIE\n" >> "${S}"/gcc/config/t-linux
+ printf "MULTILIB_OSDIRNAMS = pie\n" >> "${S}"/gcc/config/t-linux
+
+ return 0
+
want_boundschecking \
&& rm -f "${WORKDIR}"/piepatch/*/*-boundschecking-no.patch* \
|| rm -f "${WORKDIR}"/piepatch/*/*-boundschecking-yes.patch*
@@ -2467,7 +2482,7 @@ fix_libtool_libdir_paths() {
is_multilib() {
[[ ${GCCMAJOR} < 3 ]] && return 1
case ${CTARGET} in
- mips64*|powerpc64*|s390x*|sparc64*|x86_64*)
+ i[345a76]86*|mips64*|powerpc64*|s390x*|sparc64*|x86_64*)
has_multilib_profile || use multilib ;;
*) false ;;
esac