tc-arch: default to $CTARGET and then fall back to $CHOST
authorMike Frysinger <vapier@gentoo.org>
Sat, 15 Jan 2005 09:05:56 +0000 (09:05 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 15 Jan 2005 09:05:56 +0000 (09:05 +0000)
eclass/toolchain-funcs.eclass
eclass/toolchain.eclass

index cb52c9aeadf63eb8ad510965455da108c1cdcf0f..829afd3060d76afcd17a661394a9e7b15fd30abf 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.23 2005/01/15 01:19:28 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain-funcs.eclass,v 1.24 2005/01/15 09:05:56 vapier Exp $
 #
 # Author: Toolchain Ninjas <ninjas@gentoo.org>
 #
@@ -93,7 +93,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
 
        local type=$1
        local host=$2
-       [[ -z ${host} ]] && arg=${CHOST}
+       [[ -z ${host} ]] && arg=${CTARGET:-${CHOST}}
 
        case ${host} in
                alpha*)         echo alpha;;
index 3655eb0affc4d6f294497aae4c068c4992119616..4f6161526e94924be5b522cda7ee8d019f11d8ee 100644 (file)
@@ -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.78 2005/01/15 04:12:51 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.79 2005/01/15 09:05:56 vapier Exp $
 
 HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html"
 LICENSE="GPL-2 LGPL-2.1"
@@ -764,7 +764,7 @@ gcc_src_unpack() {
 
        # Fixup libtool to correctly generate .la files with portage
        cd ${S}
-       elibtoolize --portage --shallow
+       elibtoolize --portage --shallow --no-uclibc
 
        gnuconfig_update
 
@@ -1009,7 +1009,7 @@ gcc_do_make() {
                # 3 stage bootstrapping doesnt quite work when you cant run the
                # resulting binaries natively ^^;
                GCC_MAKE_TARGET=${GCC_MAKE_TARGET:-all}
-       elif use x86 || use amd64 || use ppc64; then
+       elif { use x86 || use amd64 || use ppc64 ;} && [[ ${GCC_BRANCH_VER} != "3.3" ]] ; then
                GCC_MAKE_TARGET=${GCC_MAKE_TARGET:-profiledbootstrap}
        else
                GCC_MAKE_TARGET=${GCC_MAKE_TARGET:-bootstrap-lean}
@@ -1075,8 +1075,16 @@ gcc_do_filter_flags() {
        # ...sure, why not?
        strip-unsupported-flags
 
+       # dont want to funk ourselves
        filter-flags '-mabi*' -m32 -m64
 
+       # filter *common* flags that will make other gcc's angry
+       if [[ ${GCC_BRANCH_VER} == "3.3" ]] ; then
+               case $(tc-arch ${CTARGET}) in
+                       x86) filter-flags '-mtune=*';;
+               esac
+       fi
+
        export GCJFLAGS=${GCJFLAGS:-CFLAGS}
 }