summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-devel/base-gcc/Manifest4
-rw-r--r--sys-devel/base-gcc/base-gcc-4.8.4.ebuild211
-rw-r--r--sys-devel/gcc/Manifest4
-rw-r--r--sys-devel/gcc/gcc-4.8.4.ebuild129
4 files changed, 348 insertions, 0 deletions
diff --git a/sys-devel/base-gcc/Manifest b/sys-devel/base-gcc/Manifest
index 7948bc12..f6eaba19 100644
--- a/sys-devel/base-gcc/Manifest
+++ b/sys-devel/base-gcc/Manifest
@@ -29,3 +29,7 @@ DIST gcc-4.8.3-patches-1.1.tar.bz2 19882 SHA256 019cbe76f20f4e294b900ccb99a6b525
DIST gcc-4.8.3-piepatches-v0.5.9.tar.bz2 13310 SHA256 d08e3770453edb728216243ecaf639ff7bc8aa77560fffdd561b2a0859d0b869 SHA512 d9d7dc4b7d8f52cce48dff36ee32db5346baed50968a1cacafa9a426849c5df5387061b26c8a0d2363bf91e5f55cb459cb4a176c5652690f914916047c0437f8 WHIRLPOOL 1e5cb3556b695de7f42ab44636194e86128f80bdffbe049fc1d4ee17b772bc1ea2089b3fe88bec60c52aab4bf5301344be27fd11be3c6cc8ef798d6441285c8b
DIST gcc-4.8.3-uclibc-patches-1.0.tar.bz2 3014 SHA256 75f089ed44e33be8923f82eaa1d231f71d2cded475fb10938eded386647c5e04 SHA512 7e74fefae6136d2e132ee37905adbdf7f528d31a7bb67ed97bc99b6208f177a6105ef0f0e0c77eb87368359f7da49de768ff98ec07a569e19bfdd00f67a445a8 WHIRLPOOL 6fd766ba280fc0b96f1823315b5098a36d361dc9c8d179b2e262d72156508b70c560ef5095f3556bb5c922e495cc7eefb4bd5d970b2e4dff9e9ce654703fddc5
DIST gcc-4.8.3.tar.bz2 86126808 SHA256 6a8e4f11b185f4fe2ed9d7fc053e80f8c7e73f800c045f51f9d8bea33f080f1e SHA512 2b40d231e8445f9c1654137df509f09ce1187b475138ca7f648f710d922a1718f740b2d8a37c26e16b5e27900c60358be98229ae884a6f1f70e9df44ad24d02b WHIRLPOOL 6dd3bd4b51bb9b8c52fb743bba28cde8612ff7090b71e56bf02d3613b91cd4c3c4dd91dbcb672985f22400d776870ba55550e1fc44afae9737092ceca5f83ebd
+DIST gcc-4.8.4-patches-1.1.tar.bz2 20364 SHA256 6a2f1a72e7105a4ecef4fbf5b27d7ff100294de6e1ed04be91b7854f1b864395 SHA512 54badf96bb3c20adcb456d81a91a090fbc0410383ad0b6796295296be3e119214574b4b51e691688adfb7a1259d1e037d55b8b0211fccb993043572eb41180ed WHIRLPOOL 2fb6298ea17861c6b3915476eaeca89c5750c2f2a376ecbc6fb6a5986936e16161d75a2e4ca6000d5ea95014c4c0c8f8319868cf8d77898082f112b82a044604
+DIST gcc-4.8.4-piepatches-v0.6.1.tar.bz2 14110 SHA256 558bd1babcd687979ef6269b8e4774a3a06b860bda44e0a8aafaaa55423574b4 SHA512 464c7c482a244f6e3d07beb0bbe6d007bb95502d76d08dbb9daca92bcdb4560571f85eb10a73f542a03d1c7ba90fd1e50cfb8220f933ef559ff6f7867bc8bbdc WHIRLPOOL cc3ab1819905a32dd5983d1fae5c6812343c1426ec3ef387c56eaf46c73c646e376ae6351a151bd5579393be5055a231cb94e29ab03051f729ad4c685e69b77f
+DIST gcc-4.8.4-uclibc-patches-1.0.tar.bz2 3004 SHA256 c7f9d3b7eba23a8042edad469a5e2a2a7ad613a7a6b6c658179409d7859edf41 SHA512 0e22e57731725f2d2a53c7137ee667a54ff92d30a7532660bc75220e2445452605e3e377b56b99bc3a62feb65d46b315f28aba3e075ffabd1e9d60e94e35b4af WHIRLPOOL 472cdbd2c7f77ce6505f6f5feb27d530edc5250d6e167ecd4a8ab1cd877abf4ae842f4785c55486bddb49e2e553c688c24a6d7e998cb211cde844b9867436c09
+DIST gcc-4.8.4.tar.bz2 86220648 SHA256 4a80aa23798b8e9b5793494b8c976b39b8d9aa2e53cd5ed5534aff662a7f8695 SHA512 b4c84ebd754c026029d706ef52c4242df4dcadc6a22cc5669b3aa37ac9dc25bc9cd9651fda83fb24dd5d17b1710e6865a35bb6c5cd9b95d0971717453935ae8e WHIRLPOOL b8b44413da420d083d0edcb846ad1b619971c399638e629089ca3bc8b6008a41bd38d688199f1451171d32443c37ab749f44a3763c5150f2147f729d4bd45a4b
diff --git a/sys-devel/base-gcc/base-gcc-4.8.4.ebuild b/sys-devel/base-gcc/base-gcc-4.8.4.ebuild
new file mode 100644
index 00000000..25d15a14
--- /dev/null
+++ b/sys-devel/base-gcc/base-gcc-4.8.4.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+PATCH_VER="1.1"
+UCLIBC_VER="1.0"
+
+# Hardened gcc 4 stuff
+PIE_VER="0.6.1"
+SPECS_VER="0.2.0"
+SPECS_GCC_VER="4.4.3"
+# arch/libc configurations known to be stable with {PIE,SSP}-by-default
+PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64"
+PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64"
+SSP_STABLE="amd64 x86 ppc ppc64 arm"
+# uclibc need tls and nptl support for SSP support
+# uclibc need to be >= 0.9.33
+SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm"
+#end Hardened stuff
+
+inherit eutils toolchain
+
+# This is here to redeclare is_gcc() in toolchain.eclass
+# We don't even want to build gcj, which is a real hog
+# on memory constrained hardware. base-gcc doesn't actually
+# ship with it atm.
+is_gcj() {
+ return 1
+}
+
+DESCRIPTION="The GNU Compiler Collection"
+
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.8 )
+ >=${CATEGORY}/binutils-2.20"
+
+src_prepare() {
+ # Since Sabayon's gcc ebuild are split into two parts, we have to
+ # build gcc with a different version of gcc, or terrible breakage
+ # will occur after sys-devel/base-gcc is installed, but the
+ # partner sys-devel/gcc still needs to be built.
+
+ # While it is possible to rebuild Sabayon's split gcc from
+ # the same version, we have to disallow this also since
+ # we have no way of discerning if a configuration change
+ # is significant enough to cause breakage.
+
+ GCC_PROFILE_VER=$(cat ${ROOT}/etc/env.d/gcc/config-$CHOST | awk -F- '{ print $NF }')
+ einfo "Checking for valid gcc profile to build ${P}"
+
+ # Construct the Slot of the gcc version in the active profile.
+ GCC_PROFILE_SLOT_MAJOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $1 }')
+ GCC_PROFILE_SLOT_MINOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $2 }')
+ GCC_PROFILE_SLOT="${GCC_PROFILE_SLOT_MAJOR}.${GCC_PROFILE_SLOT_MINOR}"
+ einfo "Current gcc profile version Slot is: ${GCC_PROFILE_SLOT}"
+ if [[ "${GCC_PROFILE_SLOT}" = "${SLOT}" ]] ; then
+ eerror "Error!"
+ eerror "The active gcc-profile is for sys-devel/gcc slot ${SLOT}."
+ eerror "Sabayon's split sys-devel/gcc package MUST be built"
+ eerror "with another slotted version of sys-devel/gcc active."
+ ebeep 10
+ fi
+
+ if has_version '<sys-libs/glibc-2.12' ; then
+ ewarn "Your host glibc is too old; disabling automatic fortify."
+ ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
+ EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
+ fi
+
+ # drop the x32 stuff once 4.7 goes stable
+ if [[ ${CTARGET} != x86_64* ]] || ! has x32 $(get_all_abis TARGET) ; then
+ EPATCH_EXCLUDE+=" 90_all_gcc-4.7-x32.patch"
+ fi
+
+ toolchain_src_prepare
+
+ use vanilla && return 0
+
+ #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
+ [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
+}
+
+## Just install libgcc stuff
+src_install() {
+ cd "${WORKDIR}/build"
+ S="${WORKDIR}"/build \
+ emake -j1 -C "${CTARGET}/libgcc" DESTDIR="${D}" install-shared || die
+ if use multilib; then
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgcc" DESTDIR="${D}" \
+ install-shared || die
+ fi
+
+ if use mudflap; then
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libmudflap" DESTDIR="${D}" \
+ install-toolexeclibLTLIBRARIES || die
+ if use multilib; then
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libmudflap" DESTDIR="${D}" \
+ install-toolexeclibLTLIBRARIES || die
+ fi
+ fi
+
+ if use openmp; then
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" \
+ install-toolexeclibLTLIBRARIES || die
+ if use multilib; then
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libgomp" DESTDIR="${D}" \
+ install-toolexeclibLTLIBRARIES || die
+ fi
+ fi
+
+ S="${WORKDIR}"/build \
+ emake -j1 -C "${CTARGET}/libstdc++-v3/src" DESTDIR="${D}" \
+ install-toolexeclibLTLIBRARIES || die
+ if use multilib; then
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/32/libstdc++-v3/src" DESTDIR="${D}" \
+ install-toolexeclibLTLIBRARIES || die
+ fi
+
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libstdc++-v3/po" DESTDIR="${D}" install || die
+ S="${WORKDIR}"/build emake -j1 -C "${CTARGET}/libgomp" DESTDIR="${D}" install-info || die
+
+ S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libquadmath || die
+ if use fortran; then
+ S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libgfortran || die
+ fi
+ # TODO: what to do with USE objc++ and objc-gc ?
+ if use objc; then
+ S="${WORKDIR}"/build emake -j1 DESTDIR="${D}" install-target-libobjc || die
+ fi
+
+ # from toolchain.eclass yay
+ gcc_movelibs
+
+ dodir /etc/env.d/gcc
+ create_gcc_env_entry
+
+ # Setup the gcc_env_entry for hardened gcc 4 with minispecs
+ if want_minispecs ; then
+ copy_minispecs_gcc_specs
+ fi
+
+ # drop any .la, .a
+ find "${D}" -name *.a -delete
+ find "${D}" -name *.la -delete
+
+ # drop any include
+ rm "${D}${LIBPATH}"/include -rf
+ # drop specs as well, provided by sys-devel/gcc-${PV}:${SLOT}
+ # unfortunately, the spec shit above does create the env.d/
+ # file content...
+ rm "${D}${LIBPATH}"/{32/,}*.spec{s,} -rf
+ rm "${D}${LIBPATH}"/specs -rf
+
+ # Now do the fun stripping stuff
+ env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}"
+
+ cd "${S}"
+ if ! is_crosscompile; then
+ has noinfo ${FEATURES} \
+ && rm -r "${D}/${DATAPATH}"/info \
+ || prepinfo "${DATAPATH}"
+ fi
+
+ # use gid of 0 because some stupid ports don't have
+ # the group 'root' set to gid 0
+ chown -R root:0 "${D}"${LIBPATH}
+}
+
+## Do nothing!
+pkg_preinst() {
+ :
+}
+
+## Do (almost) nothing!
+pkg_postinst() {
+ # Sabayon specific bits to always force the latest gcc profile
+ local gcc_atom=$(best_version sys-devel/base-gcc)
+ local gcc_ver=
+ if [ -n "${gcc_atom}" ]; then
+ elog "Found latest base-gcc to be: ${gcc_atom}, forcing this profile"
+ gcc_ver=$(portageq metadata "${ROOT}" installed "${gcc_atom}" PV)
+ else
+ eerror "No sys-devel/base-gcc installed"
+ fi
+
+ if [ -n "${gcc_ver}" ]; then
+ local target="${CTARGET:${CHOST}}-${gcc_ver}"
+ local env_target="${ROOT}/etc/env.d/gcc/${target}"
+ [[ -e "${env_target}-vanilla" ]] && find_target="${target}-vanilla"
+
+ elog "Setting: ${target} GCC profile"
+ gcc-config "${target}"
+ else
+ eerror "No sys-devel/base-gcc version installed? Cannot set a proper GCC profile"
+ fi
+}
+
+## Do nothing!
+pkg_prerm() {
+ :
+}
+
+## Do nothing!
+pkg_postrm() {
+ :
+}
diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
index 7948bc12..f6eaba19 100644
--- a/sys-devel/gcc/Manifest
+++ b/sys-devel/gcc/Manifest
@@ -29,3 +29,7 @@ DIST gcc-4.8.3-patches-1.1.tar.bz2 19882 SHA256 019cbe76f20f4e294b900ccb99a6b525
DIST gcc-4.8.3-piepatches-v0.5.9.tar.bz2 13310 SHA256 d08e3770453edb728216243ecaf639ff7bc8aa77560fffdd561b2a0859d0b869 SHA512 d9d7dc4b7d8f52cce48dff36ee32db5346baed50968a1cacafa9a426849c5df5387061b26c8a0d2363bf91e5f55cb459cb4a176c5652690f914916047c0437f8 WHIRLPOOL 1e5cb3556b695de7f42ab44636194e86128f80bdffbe049fc1d4ee17b772bc1ea2089b3fe88bec60c52aab4bf5301344be27fd11be3c6cc8ef798d6441285c8b
DIST gcc-4.8.3-uclibc-patches-1.0.tar.bz2 3014 SHA256 75f089ed44e33be8923f82eaa1d231f71d2cded475fb10938eded386647c5e04 SHA512 7e74fefae6136d2e132ee37905adbdf7f528d31a7bb67ed97bc99b6208f177a6105ef0f0e0c77eb87368359f7da49de768ff98ec07a569e19bfdd00f67a445a8 WHIRLPOOL 6fd766ba280fc0b96f1823315b5098a36d361dc9c8d179b2e262d72156508b70c560ef5095f3556bb5c922e495cc7eefb4bd5d970b2e4dff9e9ce654703fddc5
DIST gcc-4.8.3.tar.bz2 86126808 SHA256 6a8e4f11b185f4fe2ed9d7fc053e80f8c7e73f800c045f51f9d8bea33f080f1e SHA512 2b40d231e8445f9c1654137df509f09ce1187b475138ca7f648f710d922a1718f740b2d8a37c26e16b5e27900c60358be98229ae884a6f1f70e9df44ad24d02b WHIRLPOOL 6dd3bd4b51bb9b8c52fb743bba28cde8612ff7090b71e56bf02d3613b91cd4c3c4dd91dbcb672985f22400d776870ba55550e1fc44afae9737092ceca5f83ebd
+DIST gcc-4.8.4-patches-1.1.tar.bz2 20364 SHA256 6a2f1a72e7105a4ecef4fbf5b27d7ff100294de6e1ed04be91b7854f1b864395 SHA512 54badf96bb3c20adcb456d81a91a090fbc0410383ad0b6796295296be3e119214574b4b51e691688adfb7a1259d1e037d55b8b0211fccb993043572eb41180ed WHIRLPOOL 2fb6298ea17861c6b3915476eaeca89c5750c2f2a376ecbc6fb6a5986936e16161d75a2e4ca6000d5ea95014c4c0c8f8319868cf8d77898082f112b82a044604
+DIST gcc-4.8.4-piepatches-v0.6.1.tar.bz2 14110 SHA256 558bd1babcd687979ef6269b8e4774a3a06b860bda44e0a8aafaaa55423574b4 SHA512 464c7c482a244f6e3d07beb0bbe6d007bb95502d76d08dbb9daca92bcdb4560571f85eb10a73f542a03d1c7ba90fd1e50cfb8220f933ef559ff6f7867bc8bbdc WHIRLPOOL cc3ab1819905a32dd5983d1fae5c6812343c1426ec3ef387c56eaf46c73c646e376ae6351a151bd5579393be5055a231cb94e29ab03051f729ad4c685e69b77f
+DIST gcc-4.8.4-uclibc-patches-1.0.tar.bz2 3004 SHA256 c7f9d3b7eba23a8042edad469a5e2a2a7ad613a7a6b6c658179409d7859edf41 SHA512 0e22e57731725f2d2a53c7137ee667a54ff92d30a7532660bc75220e2445452605e3e377b56b99bc3a62feb65d46b315f28aba3e075ffabd1e9d60e94e35b4af WHIRLPOOL 472cdbd2c7f77ce6505f6f5feb27d530edc5250d6e167ecd4a8ab1cd877abf4ae842f4785c55486bddb49e2e553c688c24a6d7e998cb211cde844b9867436c09
+DIST gcc-4.8.4.tar.bz2 86220648 SHA256 4a80aa23798b8e9b5793494b8c976b39b8d9aa2e53cd5ed5534aff662a7f8695 SHA512 b4c84ebd754c026029d706ef52c4242df4dcadc6a22cc5669b3aa37ac9dc25bc9cd9651fda83fb24dd5d17b1710e6865a35bb6c5cd9b95d0971717453935ae8e WHIRLPOOL b8b44413da420d083d0edcb846ad1b619971c399638e629089ca3bc8b6008a41bd38d688199f1451171d32443c37ab749f44a3763c5150f2147f729d4bd45a4b
diff --git a/sys-devel/gcc/gcc-4.8.4.ebuild b/sys-devel/gcc/gcc-4.8.4.ebuild
new file mode 100644
index 00000000..e4c17644
--- /dev/null
+++ b/sys-devel/gcc/gcc-4.8.4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+
+PATCH_VER="1.1"
+UCLIBC_VER="1.0"
+
+# Hardened gcc 4 stuff
+PIE_VER="0.6.1"
+SPECS_VER="0.2.0"
+SPECS_GCC_VER="4.4.3"
+# arch/libc configurations known to be stable with {PIE,SSP}-by-default
+PIE_GLIBC_STABLE="x86 amd64 ppc ppc64 arm ia64"
+PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64"
+SSP_STABLE="amd64 x86 ppc ppc64 arm"
+# uclibc need tls and nptl support for SSP support
+# uclibc need to be >= 0.9.33
+SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm"
+#end Hardened stuff
+
+inherit eutils toolchain
+
+DESCRIPTION="The GNU Compiler Collection"
+
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+
+## Make sure we share all the USE flags in sys-devel/base-gcc
+BASE_GCC_USE="fortran gcj mudflap multilib nls nptl openmp altivec
+ bootstrap build doc fixed-point graphite hardened
+ multislot cxx nopie nossp objc objc++ objc-gc test vanilla"
+for base_use in ${BASE_GCC_USE}; do
+ RDEPEND+=" ~sys-devel/base-gcc-${PV}[${base_use}?]"
+done
+IUSE="${BASE_GCC_USE}"
+
+RDEPEND="~sys-devel/base-gcc-${PV} ${RDEPEND}"
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.8 )
+ >=${CATEGORY}/binutils-2.20"
+## Should this be moved to base-gcc?
+## I guess the cross-* thing is now utterly broken
+if [[ ${CATEGORY} != cross-* ]] ; then
+ PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )"
+fi
+
+## Check for valid gcc profile.
+src_prepare() {
+ # Since Sabayon's gcc ebuild are split into two parts, we have to
+ # build gcc with a different version of gcc, or terrible breakage
+ # will occur after sys-devel/base-gcc is installed, but the
+ # partner sys-devel/gcc still needs to be built.
+
+ # While it is possible to rebuild Sabayon's split gcc from
+ # the same version, we have to disallow this also since
+ # we have no way of discerning if a configuration change
+ # is significant enough to cause breakage.
+
+ GCC_PROFILE_VER=$(cat ${ROOT}/etc/env.d/gcc/config-$CHOST | awk -F- '{ print $NF }')
+ einfo "Checking for valid gcc profile to build ${P}"
+
+ # Construct the Slot of the gcc version in the active profile.
+ GCC_PROFILE_SLOT_MAJOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $1 }')
+ GCC_PROFILE_SLOT_MINOR=$(echo ${GCC_PROFILE_VER} | awk -F. '{ print $2 }')
+ GCC_PROFILE_SLOT="${GCC_PROFILE_SLOT_MAJOR}.${GCC_PROFILE_SLOT_MINOR}"
+ einfo "Current gcc profile version Slot is: ${GCC_PROFILE_SLOT}"
+ if [[ "${GCC_PROFILE_SLOT}" = "${SLOT}" ]] ; then
+ eerror "Error!"
+ eerror "The active gcc-profile is for sys-devel/gcc slot ${SLOT}."
+ eerror "Sabayon's split sys-devel/gcc package MUST be built"
+ eerror "with another slotted version of sys-devel/gcc active."
+ ebeep 10
+ fi
+
+ if has_version '<sys-libs/glibc-2.12' ; then
+ ewarn "Your host glibc is too old; disabling automatic fortify."
+ ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
+ EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
+ fi
+
+ toolchain_src_prepare
+
+ use vanilla && return 0
+
+ #Use -r1 for newer piepatchet that use DRIVER_SELF_SPECS for the hardened specs.
+ [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env-r1.patch
+}
+
+## Just install libgcc stuff
+src_install() {
+ toolchain_src_install
+
+ # now drop what's provided by sys-devel/base-gcc-${PV}:${SLOT}
+ base_gcc_libs="libgfortran.so* libgcc_s.so* libobjc.so*
+ libobjc_gc.so* libmudflap.so* libmudflapth.so* libgomp.so* libstdc++.so* libquadmath.so*
+ crtprec80.o crtbeginP.o crtfastmath.o crtprec32.o crtbeginT.o
+ crtbeginS.o crtbegin.o crtend.o crtendS.o crtprec64.o"
+ base_multilib_gcc_libs="32/libgfortran.so* 32/libobjc.so* 32/libobjc_gc.so*
+ 32/libgcc_s.so* 32/libgomp.so* 32/libmudflap.so*
+ 32/libmudflapth.so* 32/libstdc++.so* 32/libquadmath.so*
+ 32/crtprec80.o 32/crtbeginP.o 32/crtfastmath.o 32/crtprec32.o 32/crtbeginT.o
+ 32/crtbeginS.o 32/crtbegin.o 32/crtend.o 32/crtendS.o 32/crtprec64.o"
+ for gcc_lib in ${base_gcc_libs}; do
+ # -f is used because the file might not be there
+ rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}"
+ debug_dir="${D}"/usr/lib/debug
+ if [ -d "${debug_dir}" ]; then
+ rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug"
+ fi
+ done
+ if use multilib; then
+ for gcc_lib in ${base_multilib_gcc_libs}; do
+ # -f is used because the file might not be there
+ rm "${D}"${LIBPATH}/${gcc_lib} -rf || die "cannot execute rm on ${gcc_lib}"
+ debug_dir="${D}"/usr/lib/debug
+ if [ -d "${debug_dir}" ]; then
+ rm "${debug_dir}"${LIBPATH}/${gcc_lib}.debug -rf || die "cannot execute rm on ${gcc_lib}.debug"
+ fi
+ done
+ fi
+ # then .mo files provided by sys-devel/base-gcc-${PV}:${SLOT}
+ find "${D}"${DATAPATH}/locale -name libstdc++.mo -delete
+ find "${D}"${DATAPATH}/info -name libgomp.info* -delete
+ find "${D}"${DATAPATH}/info -name libquadmath.info* -delete
+
+ # drop stuff from env.d, provided by sys-devel/base-gcc-${PV}:${SLOT}
+ rm "${D}"/etc/env.d -rf
+}