diff options
author | Alexander Gabert <pappy@gentoo.org> | 2004-02-26 19:55:17 +0000 |
---|---|---|
committer | Alexander Gabert <pappy@gentoo.org> | 2004-02-26 19:55:17 +0000 |
commit | bac2f63ba7f91e04bc15632e383698acb8a926fe (patch) | |
tree | 0e55bc8444d5220d89c21dd879888552d161c9b6 /sys-devel/gcc | |
parent | MakeIndex license for app-text/csindex (diff) | |
download | gentoo-2-bac2f63ba7f91e04bc15632e383698acb8a926fe.tar.gz gentoo-2-bac2f63ba7f91e04bc15632e383698acb8a926fe.tar.bz2 gentoo-2-bac2f63ba7f91e04bc15632e383698acb8a926fe.zip |
implemented easier patch logic for SSP and PIE support with Azarah
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r-- | sys-devel/gcc/ChangeLog | 5 | ||||
-rw-r--r-- | sys-devel/gcc/Manifest | 4 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-3.3.3-r1.ebuild | 76 |
3 files changed, 38 insertions, 47 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog index e6803f860018..a53203375574 100644 --- a/sys-devel/gcc/ChangeLog +++ b/sys-devel/gcc/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-devel/gcc # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.181 2004/02/26 19:32:05 pappy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.182 2004/02/26 19:55:17 pappy Exp $ + + 26 Feb 2004; Alexander Gabert <pappy@gentoo.org> gcc-3.3.3-r1.ebuild: + implemented easier patch logic for SSP and PIE support with Azarah *gcc-3.3.3-r1 (26 Feb 2004) diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest index 0b80be2447fa..be0ff466870e 100644 --- a/sys-devel/gcc/Manifest +++ b/sys-devel/gcc/Manifest @@ -15,7 +15,7 @@ MD5 660074fa86b8cf9f8f2b1e019b367d10 gcc-3.3.3.ebuild 21995 MD5 bd281971d3658dd49f02f647b97c4eeb gcc-3.3.1-r5.ebuild 18002 MD5 93a77c5c1b136d73c15e134b608b6a54 gcc-3.2.3-r3.ebuild 19840 MD5 c4fc29c96967136ea3194ce469953f59 gcc-3.0.4-r6.ebuild 8737 -MD5 594b85309358771981667b037bc7a4b2 gcc-3.3.3-r1.ebuild 23447 +MD5 e707442ba085aa40f586d8347b225ca6 gcc-3.3.3-r1.ebuild 22970 MD5 ec9ea33935b4c06e7fb11612ef8629a9 gcc-3.1.1-r1.ebuild 9594 MD5 14cf69f1206d85356781dd2ad63eb7ca gcc-3.3.2-r4.ebuild 20741 MD5 9a1b8330dd0094a8e27e53edf7f67d58 gcc-3.2.2.ebuild 16081 @@ -24,7 +24,7 @@ MD5 591e5cb9a9737b7712643eccae1745f0 gcc-3.2-r5.ebuild 12882 MD5 878b7184447786f3a855d7e6f3f1cad5 gcc-3.3.2-r6.ebuild 21281 MD5 e0d74c30e98543382cfcdb854909697c gcc-3.1-r8.ebuild 9775 MD5 e6ead3ed008a1fe7adc73ddae996ade3 gcc-3.3.2-r1.ebuild 17965 -MD5 4f88b857b61c2c9ece279d819b0c5d12 ChangeLog 38277 +MD5 5edb4369c12a3335b67e5db75f53824d ChangeLog 38419 MD5 f5ca2186c83a045153d264f0ebdd72c5 gcc-3.3.2.ebuild 17909 MD5 22d9e3c49111d1b8b8ec1484732087c9 metadata.xml 259 MD5 8d59e9c42fb370299805308137fd21e5 gcc-3.2.3-r2.ebuild 17301 diff --git a/sys-devel/gcc/gcc-3.3.3-r1.ebuild b/sys-devel/gcc/gcc-3.3.3-r1.ebuild index baee864ad544..111435ef4297 100644 --- a/sys-devel/gcc/gcc-3.3.3-r1.ebuild +++ b/sys-devel/gcc/gcc-3.3.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.3-r1.ebuild,v 1.2 2004/02/26 19:32:05 pappy Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.3-r1.ebuild,v 1.3 2004/02/26 19:55:17 pappy Exp $ IUSE="static nls bootstrap java build X multilib nogcj" @@ -260,9 +260,11 @@ update_gcc_for_libc_ssp() { } src_unpack() { + local release_version="Gentoo Linux ${PVR}" + if [ -n "${PP_VER}" ] && [ "${ARCH}" != "hppa" ] then - # Check for the glibc to have the guard + # the guard check should be very early in the unpack process check_glibc_ssp fi @@ -317,59 +319,45 @@ src_unpack() { epatch ${FILESDIR}/3.3.2/gcc332-altivec-fix.patch fi - if [ "${ARCH}" == "hppa" ] + # non-default SSP and PIE support for the Gentoo Hardened project + if [ "${ARCH}" != "hppa" -a "${ARCH}" != "hppa64" -a -n "${PP_VER}" ] then - if [ -n "`use hardened`" ] - then - # hppa system without propolice and with hardened - einfo "Updating gcc to use automatic PIE building ..." - sed -e 's|^ALL_CFLAGS = |ALL_CFLAGS = -DEFAULT_PIE |' \ - -i ${S}/gcc/Makefile.in || die "Failed to update gcc!" + # ProPolice Stack Smashing protection + EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \ + epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch - RELEASE_VERSION="${BRANCH_UPDATE} (Gentoo Hardened GNU/Linux ${PVR}, pie-${PIE_VER})" - else - # hppa system without propolice and without hardened - RELEASE_VERSION="${BRANCH_UPDATE} (Gentoo Linux ${PVR})" - fi - else - if [ -z "${PP_VER}" ] - then - # Make gcc's version info specific to Gentoo - RELEASE_VERSION="${BRANCH_UPDATE} (Gentoo Linux ${PVR})" - else - # ProPolice Stack Smashing protection - EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \ - epatch ${FILESDIR}/3.3.1/gcc331-pp-fixup.patch + EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \ + epatch ${FILESDIR}/3.3.3/gcc333-ssp-3.3_7-fixup.patch - EPATCH_OPTS="${EPATCH_OPTS} ${WORKDIR}/protector.dif" \ - epatch ${FILESDIR}/3.3.3/gcc333-ssp-3.3_7-fixup.patch + epatch ${WORKDIR}/protector.dif - epatch ${WORKDIR}/protector.dif + cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found" + cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found" - cp ${WORKDIR}/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found" - cp ${WORKDIR}/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found" + release_version="${release_version}, ssp-${PP_VER}" - update_gcc_for_libc_ssp + update_gcc_for_libc_ssp + fi - if [ -n "`use hardened`" ] - then - einfo "Updating gcc to use automatic PIE + SSP building ..." - sed -e 's|^ALL_CFLAGS = |ALL_CFLAGS = -DEFAULT_PIE_SSP |' \ - -i ${S}/gcc/Makefile.in || die "Failed to update gcc!" + # This patch enables improved PIE and SSP behaviour but does not + # enable it by default ... - RELEASE_VERSION="${BRANCH_UPDATE} (Gentoo Hardened GNU/Linux ${PVR}, pie-${PIE_VER} ssp-${PP_FVER})" - else - RELEASE_VERSION="${BRANCH_UPDATE} (Gentoo Linux ${PVR}, pie-${PIE_VER} ssp-${PP_FVER})" - fi - fi + cd ${WORKDIR}/${P}; epatch "${DISTDIR}/gcc-3.3.2-nodefault-pie-ssp.patch" + + if [ -n "`use hardened`" ] + then + einfo "Updating gcc to use automatic PIE + SSP building ..." + sed -e 's|^ALL_CFLAGS = |ALL_CFLAGS = -DEFAULT_PIE_SSP |' \ + -i ${S}/gcc/Makefile.in || die "Failed to update gcc!" + + # will show if default PIE/SSP building was used - make bug reports easier + release_version="${release_version/Gentoo/Gentoo Hardened}, pie-${PIE_VER}" + else + release_version="${release_version}, pie-${PIE_VER}" fi - # update the Gentoo gcc version string, use hardened if building default PIE and SSP version_patch ${FILESDIR}/3.3.3/gcc333-gentoo-branding.patch \ - "${RELEASE_VERSION}" || die "Failed Branding" - - # this patch enables improved pie and ssp behaviour but does not enable it by default - cd ${WORKDIR}/${P}; epatch "${DISTDIR}/gcc-3.3.2-nodefault-pie-ssp.patch" + "${BRANCH_UPDATE} (${release_version})" || die "Failed Branding" # TODO: on arches where we lack a Scrt1.o (like parisc) we still need unpack, compile and install logic # TODO: for the crt1Snocsu.o provided by a custom gcc-pie-ssp.tgz which can also be included in SRC_URI |