summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2015-04-19 18:13:19 +0200
committerThomas Martitz <kugel@rockbox.org>2015-04-19 18:14:23 +0200
commit2e5810217477d9e87ea3c34ab210c588ba38e01e (patch)
treed1b0e475d362c67af5bfaf758f464abfaa0bd43e /tools
parentd8ee5fcfc4282b4ed2cc002e3c11ce9bf5c44572 (diff)
downloadrockbox-2e5810217477d9e87ea3c34ab210c588ba38e01e.tar.gz
rockbox-2e5810217477d9e87ea3c34ab210c588ba38e01e.tar.bz2
rockbox-2e5810217477d9e87ea3c34ab210c588ba38e01e.zip
configure: harden arch autodetected a bit
Some arm gcc versions have multiple cpp symbols beginning with __ARM_ARCH, but want only the one that contains the arch version. Change-Id: I6792572e29200fc4e62ba07bdd63dc722356c2bb
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/configure b/tools/configure
index 13cd5995b2..ec8350212a 100755
--- a/tools/configure
+++ b/tools/configure
@@ -4249,10 +4249,10 @@ if [ -z "$arch" ]; then
elif [ -n "$(echo $cpp_defines | grep -w __arm__)" ]; then
arch="arm"
# cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
- arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,')"
+ arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH)"
elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
arch="mips"
- arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,')"
+ arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,' | grep -v _MIPS_ARCH_MIPS)"
elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
arch="x86"
elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then