summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-09-20 04:50:53 +0000
committerMike Frysinger <vapier@gentoo.org>2005-09-20 04:50:53 +0000
commite38a986fd84b913ea1518230e485a3a782f43376 (patch)
tree43bf37843e26cf8d9e2801783b0eecec23fcaeb2 /eclass
parentInitial commit. Ebuild by Robin H. Johnson <robbat2@gentoo.org>. A special th... (diff)
downloadgentoo-2-e38a986fd84b913ea1518230e485a3a782f43376.tar.gz
gentoo-2-e38a986fd84b913ea1518230e485a3a782f43376.tar.bz2
gentoo-2-e38a986fd84b913ea1518230e485a3a782f43376.zip
touch up the USE=nocxx support in cross-compilers so that we can get a normal C-only stage2 gcc ... also fix other multilib mips option to be a noop for cross-compilers
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass29
1 files changed, 19 insertions, 10 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 30d1a509ebff..94ccfb989290 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.192 2005/09/20 02:31:38 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.193 2005/09/20 04:50:53 vapier Exp $
HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
LICENSE="GPL-2 LGPL-2.1"
@@ -1051,7 +1051,6 @@ gcc_do_configure() {
confgcc="${confgcc} --target=${CTARGET}"
fi
[[ -n ${CBUILD} ]] && confgcc="${confgcc} --build=${CBUILD}"
- is_crosscompile && confgcc="${confgcc} --with-sysroot=${PREFIX}/${CTARGET}"
# ppc altivec support
confgcc="${confgcc} $(use_enable altivec)"
@@ -1082,13 +1081,22 @@ gcc_do_configure() {
GCC_LANG=${GCC_LANG:-c}
confgcc="${confgcc} --enable-languages=${GCC_LANG}"
- # When building a stage1 cross-compiler (just C compiler), we have to
- # disable a bunch of features or gcc goes boom
- if is_crosscompile && [[ ${GCC_LANG} == "c" ]] ; then
- confgcc="${confgcc} --disable-shared --disable-threads --without-headers"
- # If we want to do C++ on avr then we have to punt threads
- elif is_crosscompile && [[ ${CTARGET} == "avr" ]] ; then
- confgcc="${confgcc} $(use_enable !static shared) --disable-threads"
+ if is_crosscompile ; then
+ # When building a stage1 cross-compiler (just C compiler), we have to
+ # disable a bunch of features or gcc goes boom
+ local needed_libc=""
+ case ${CTARGET} in
+ *-gnu) needed_libc=glibc;;
+ *-uclibc) needed_libc=uclibc;;
+ avr) confgcc="${confgcc} $(use_enable !static shared) --disable-threads";;
+ esac
+ if [[ -n ${needed_libc} ]] ; then
+ if ! has_version ${CATEGORY}/${needed_libc} ; then
+ confgcc="${confgcc} --disable-shared --disable-threads --without-headers"
+ else
+ confgcc="${confgcc} --with-sysroot=${PREFIX}/${CTARGET}"
+ fi
+ fi
else
confgcc="${confgcc} $(use_enable !static shared) --enable-threads=posix"
fi
@@ -1529,8 +1537,9 @@ gcc-compiler_src_install() {
amd64) abilist="x86";;
ppc64) abilist="ppc";;
sparc) abilist="sparc32";;
+ mips) true;;
*)
- eeror "Unknown multilib arch: $(tc-arch)"
+ eerror "Unknown multilib arch: $(tc-arch)"
die "Unknown multilib arch: $(tc-arch)"
esac