mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 05:35:02 -05:00
configure: Revamp MIPS architecture version+revision detection
This allows us to easily distinguish between mips32 and mips32r2 (Works at least as far back as gcc 4.9) Change-Id: I2bcba194fd9cbeedf76cea739252271908bf73d0
This commit is contained in:
parent
5e5b434ce8
commit
6c6bdbf60e
3 changed files with 7 additions and 3 deletions
6
tools/configure
vendored
6
tools/configure
vendored
|
|
@ -4784,7 +4784,11 @@ if [ -z "$arch" ]; then
|
|||
esac
|
||||
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,' | grep -v _MIPS_ARCH_MIPS)"
|
||||
arch_version="$(echo "$cpp_defines" | grep 'define __mips ' | sed -e 's,.* \([0-9]\+\).*,\1,')"
|
||||
arch_revision="$(echo "$cpp_defines" | grep 'define __mips_isa_rev ' | sed -e 's,.* \([0-9]\+\).*,\1,')"
|
||||
if [ -n "$arch_revision" ] ; then
|
||||
arch_version="${arch_version}r${arch_revision}"
|
||||
fi
|
||||
elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
|
||||
arch="x86"
|
||||
elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue