summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hardened/toolchain/branches/pieworld/sys-devel/gcc/gcc-4.1.1-r3.ebuild')
-rw-r--r--hardened/toolchain/branches/pieworld/sys-devel/gcc/gcc-4.1.1-r3.ebuild14
1 files changed, 10 insertions, 4 deletions
diff --git a/hardened/toolchain/branches/pieworld/sys-devel/gcc/gcc-4.1.1-r3.ebuild b/hardened/toolchain/branches/pieworld/sys-devel/gcc/gcc-4.1.1-r3.ebuild
index b5043b2..cbe84ee 100644
--- a/hardened/toolchain/branches/pieworld/sys-devel/gcc/gcc-4.1.1-r3.ebuild
+++ b/hardened/toolchain/branches/pieworld/sys-devel/gcc/gcc-4.1.1-r3.ebuild
@@ -15,7 +15,7 @@ SSP_UCLIBC_STABLE="ppc sparc x86"
PIE_GLIBC_STABLE="amd64 ppc ppc64 sparc x86"
PIE_UCLIBC_STABLE="mips ppc x86"
-# arch/libc configurations known to be broken with {PIE,SSP}-by-default
+# arch/libc configurations known to be broken with {PIE,SSP}-by-default.
# gcc-4 SSP is only available on FRAME_GROWS_DOWNWARD arches; so it's not
# available on pa, c4x, ia64, alpha, iq2000, m68hc11, stormy16
# (the options are parsed, but they're effectively no-ops).
@@ -27,8 +27,8 @@ PIE_UCLIBC_UNSUPPORTED="alpha amd64 arm hppa ia64 m68k ppc64 s390 sh sparc"
PIE_GLIBC_UNSUPPORTED="hppa"
# This patch is obsoleted by stricter control over how one builds a hardened
-# compiler from a vanilla compiler - by forbidding changing from normal to
-# hardened between stages, this is no longer necessary.
+# compiler from a vanilla compiler. By forbidding changing from normal to
+# hardened between gcc stages, this is no longer necessary.
GENTOO_PATCH_EXCLUDE="51_all_gcc-3.4-libiberty-pic.patch"
# whether we should split out specs files for multiple {PIE,SSP}-by-default
@@ -60,9 +60,12 @@ RDEPEND=">=sys-libs/zlib-1.1.4
)
>=sys-libs/ncurses-5.2-r2
nls? ( sys-devel/gettext )
- hardened? ( >=sys-libs/glibc-2.4 )
)"
+# Hardened gcc builds with SSP enabled on itself, so requires a
+# gcc-4-SSP-compatible glibc installed, from gcc's stage1 onwards.
+# We assume uclibc users know what they're doing.
DEPEND="${RDEPEND}
+ hardened? ( elibc_glibc? ( >=sys-libs/glibc-2.4 ) )
test? ( sys-devel/autogen dev-util/dejagnu )
>=sys-apps/texinfo-4.2-r4
>=sys-devel/bison-1.875
@@ -88,6 +91,9 @@ src_unpack() {
epatch "${FILESDIR}"/4.1.0/gcc-4.1.0-fast-math-i386-Os-workaround.patch
+ # Add the crtbeginTS.o file - used for "static PIE" links
+ epatch "${FILESDIR}"/4.1.1/gcc-4.1.1-crtbeginTS.patch
+ # Ensure crtfiles are built fno-PIC/fPIC as appropriate, not fPIE
use hardened &&
epatch "${FILESDIR}"/4.1.1/gcc-4.1.1-nopie-crtstuff.patch
}