summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-09-26 17:32:44 +0000
committerMike Frysinger <vapier@gentoo.org>2011-09-26 17:32:44 +0000
commit0a67b864b7b27de830852e7473b8b461cdea66dd (patch)
treebf1962ba025500ff2ab1bb688a3d3d7f7d32d68a /eclass/toolchain.eclass
parentMoving to EAPI 4, adding upcall use flag, which enable cifsidmap, forcing use... (diff)
downloadhistorical-0a67b864b7b27de830852e7473b8b461cdea66dd.tar.gz
historical-0a67b864b7b27de830852e7473b8b461cdea66dd.tar.bz2
historical-0a67b864b7b27de830852e7473b8b461cdea66dd.zip
scrub more ETYPE logic
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass83
1 files changed, 31 insertions, 52 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index afb27c188f05..62aebd165642 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.469 2011/09/22 23:08:28 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.470 2011/09/26 17:32:44 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -719,25 +719,21 @@ copy_minispecs_gcc_specs() {
#---->> pkg_* <<----
toolchain_pkg_setup() {
- [[ -z ${ETYPE} ]] && die "Your ebuild needs to set the ETYPE variable"
-
- if [[ ${ETYPE} == "gcc-compiler" ]] ; then
- # Setup variables which would normally be in the profile
- if is_crosscompile ; then
- multilib_env ${CTARGET}
- if ! is_multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- fi
+ # Setup variables which would normally be in the profile
+ if is_crosscompile ; then
+ multilib_env ${CTARGET}
+ if ! is_multilib ; then
+ MULTILIB_ABIS=${DEFAULT_ABI}
fi
+ fi
- # we dont want to use the installed compiler's specs to build gcc!
- unset GCC_SPECS
+ # we dont want to use the installed compiler's specs to build gcc!
+ unset GCC_SPECS
- if use nocxx ; then
- use go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"'
- use objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"'
- use gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"'
- fi
+ if use nocxx ; then
+ use go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"'
+ use objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"'
+ use gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"'
fi
want_libssp && libc_has_ssp && \
@@ -847,36 +843,6 @@ toolchain_pkg_postrm() {
#---->> src_* <<----
-# generic GCC src_unpack, to be called from the ebuild's src_unpack.
-# BIG NOTE regarding hardened support: ebuilds with support for hardened are
-# expected to export the following variable:
-#
-# HARDENED_GCC_WORKS
-# This variable should be set to the archs on which hardened should
-# be allowed. For example: HARDENED_GCC_WORKS="x86 sparc amd64"
-# This allows for additional archs to be supported by hardened when
-# ready.
-#
-# Travis Tilley <lv@gentoo.org> (03 Sep 2004)
-#
-gcc-compiler_src_unpack() {
- # fail if using pie patches, building hardened, and glibc doesnt have
- # the necessary support
- want_pie && use hardened && glibc_have_pie
-
- if use hardened ; then
- einfo "updating configuration to build hardened GCC"
- make_gcc_hard || die "failed to make gcc hard"
- fi
-
- if is_libffi ; then
- # move the libffi target out of gcj and into all
- sed -i \
- -e '/^libgcj=/s:target-libffi::' \
- -e '/^target_lib/s:=":="target-libffi :' \
- "${S}"/configure || die
- fi
-}
guess_patch_type_in_dir() {
[[ -n $(ls "$1"/*.bz2 2>/dev/null) ]] \
&& EPATCH_SUFFIX="patch.bz2" \
@@ -944,7 +910,22 @@ toolchain_src_unpack() {
do_gcc_PIE_patches
epatch_user
- ${ETYPE}_src_unpack || die "failed to ${ETYPE}_src_unpack"
+ # fail if using pie patches, building hardened, and glibc doesnt have
+ # the necessary support
+ want_pie && use hardened && glibc_have_pie
+
+ if use hardened ; then
+ einfo "updating configuration to build hardened GCC"
+ make_gcc_hard || die "failed to make gcc hard"
+ fi
+
+ if is_libffi ; then
+ # move the libffi target out of gcj and into all
+ sed -i \
+ -e '/^libgcj=/s:target-libffi::' \
+ -e '/^target_lib/s:=":="target-libffi :' \
+ "${S}"/configure || die
+ fi
# protoize don't build on FreeBSD, skip it
## removed in 4.5, bug #270558 --de.
@@ -1298,9 +1279,7 @@ gcc_do_configure() {
--disable-werror \
--enable-secureplt"
- # etype specific configuration
- einfo "running ${ETYPE}-configure"
- ${ETYPE}-configure || die
+ gcc-compiler-configure || die
# if not specified, assume we are building for a target that only
# requires C support
@@ -1617,7 +1596,7 @@ toolchain_src_compile() {
# Do not create multiple specs files for PIE+SSP if boundschecking is in
# USE, as we disable PIE+SSP when it is.
- if [[ ${ETYPE} == "gcc-compiler" ]] && want_split_specs && ! want_minispecs; then
+ if want_split_specs && ! want_minispecs; then
split_out_specs_files || die "failed to split out specs"
fi