mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 05:35:02 -05:00
configure: Simplify the arm architecture version lookup
Going back to at least gcc 4.9, we can key off of __ARM_ARCH which is all we care about here. Change-Id: Ic2659db5ff55ccefe2c3f71957b967f36025f7e3
This commit is contained in:
parent
1203b8657e
commit
5e5b434ce8
1 changed files with 6 additions and 6 deletions
8
tools/configure
vendored
8
tools/configure
vendored
|
|
@ -4727,8 +4727,8 @@ if [ -z "$arch" ]; then
|
|||
arch="m68k"
|
||||
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,' | grep -v __ARM_ARCH | head -1)"
|
||||
# cpp defines like "#define __ARM_ARCH 4" (where we want to extract the 4)
|
||||
arch_version="$(echo "$cpp_defines" | grep 'define __ARM_ARCH ' | sed -e 's,.* \([0-9]\).*,\1,')"
|
||||
arch_profile="$(echo "$cpp_defines" | grep 'define __ARM_ARCH_PROFILE ' | sed -e 's,.* \([0-9]\+\)$,\1,')"
|
||||
if test "$gccnum" -ge "800"; then
|
||||
# GCC8+ can natively emit unified asm syntax
|
||||
|
|
@ -4770,8 +4770,8 @@ if [ -z "$arch" ]; then
|
|||
esac
|
||||
elif [ -n "$(echo $cpp_defines | grep -w __aarch64__)" ]; then
|
||||
arch="arm64"
|
||||
# cpp defines like "#define __ARM_ARCH_8A__ 1" (where we want to extract the 8)
|
||||
arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep __ARM_ARCH | sed -e 's,.*\([0-9]\).*,\1,' | grep -v __ARM_ARCH | head -1)"
|
||||
# cpp defines like "#define __ARM_ARCH 8" (where we want to extract the 8)
|
||||
arch_version="$(echo "$cpp_defines" | grep 'define __ARM_ARCH ' | sed -e 's,.* \([0-9]\).*,\1,')"
|
||||
arch_profile="$(echo "$cpp_defines" | grep 'define __ARM_ARCH_PROFILE ' | sed -e 's,.* \([0-9]\+\)$,\1,')"
|
||||
case "$arch_profile" in
|
||||
65) # Cortex-A
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue