summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-03-07 04:37:01 +0000
committerMike Frysinger <vapier@gentoo.org>2010-03-07 04:37:01 +0000
commit2705480d74ce0456da1dbf167aa048c984cdc974 (patch)
treec7d90ddb126378d5a7a4a8dd071d2dbb772259b4 /eclass
parentwhitespace (diff)
downloadgentoo-2-2705480d74ce0456da1dbf167aa048c984cdc974.tar.gz
gentoo-2-2705480d74ce0456da1dbf167aa048c984cdc974.tar.bz2
gentoo-2-2705480d74ce0456da1dbf167aa048c984cdc974.zip
simplify arm --with-arch cruft
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass16
1 files changed, 7 insertions, 9 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index b097eaecda0f..5d24497397c8 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.419 2010/03/06 14:50:02 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.420 2010/03/07 04:37:01 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -1230,17 +1230,15 @@ gcc-compiler-configure() {
fi
case $(tc-arch) in
- # bug #264534
- arm)
+ arm) #264534
local arm_arch="${CTARGET%%-*}"
# Only do this if arm_arch is armv*
- if [[ -z "${arm_arch##armv*}" ]]; then
+ if [[ ${arm_arch} == armv* ]] ; then
# Convert armv7{a,r,m} to armv7-{a,r,m}
- [[ ! -z "${arm_arch##armv7}" ]] && arm_arch="${arm_arch/armv7/armv7-}"
- # Remove 'l'
- [[ -z "${arm_arch##armv*l}" ]] && arm_arch="${arm_arch/l/}"
- # Remove 'eb'
- [[ -z "${arm_arch##armv*eb}" ]] && arm_arch="${arm_arch/eb/}"
+ [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
+ # Remove endian ('l' / 'eb')
+ [[ ${arm_arch} == *l ]] && arm_arch=${arm_arch%l}
+ [[ ${arm_arch} == *eb ]] && arm_arch=${arm_arch%eb}
confgcc="${confgcc} --with-arch=${arm_arch}"
fi
;;