mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
configure: autodetect mips arch version
Change-Id: Icaaca3d23ca89da977a065396b1961f9fe40da41
This commit is contained in:
parent
99f20b85f6
commit
885079b8af
1 changed files with 3 additions and 5 deletions
8
tools/configure
vendored
8
tools/configure
vendored
|
@ -500,8 +500,6 @@ arm7ejscc () {
|
||||||
}
|
}
|
||||||
|
|
||||||
mipselcc () {
|
mipselcc () {
|
||||||
arch="mips"
|
|
||||||
arch_version=32 # FIXME: autodetect version (32 or 64)
|
|
||||||
prefixtools mipsel-elf-
|
prefixtools mipsel-elf-
|
||||||
# mips is predefined, but we want it for paths. use __mips instead
|
# mips is predefined, but we want it for paths. use __mips instead
|
||||||
GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
|
GCCOPTS="$CCOPTS -march=mips32 -mtune=r4600 -mno-mips16 -mno-long-calls -Umips"
|
||||||
|
@ -698,7 +696,6 @@ androidmipscc () {
|
||||||
gccchoice="4.4.3"
|
gccchoice="4.4.3"
|
||||||
gcctarget="mipsel-linux-android-"
|
gcctarget="mipsel-linux-android-"
|
||||||
gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
|
gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86
|
||||||
arch_version=32 # FIXME: autodetect version (32 or 64)
|
|
||||||
thread_support="HAVE_SIGALTSTACK_THREADS"
|
thread_support="HAVE_SIGALTSTACK_THREADS"
|
||||||
PATH=$PATH:$gccprefix/bin
|
PATH=$PATH:$gccprefix/bin
|
||||||
prefixtools $gcctarget
|
prefixtools $gcctarget
|
||||||
|
@ -3751,7 +3748,8 @@ if [ -z "$arch" ]; then
|
||||||
# cpp defines like "#define __ARM_ARCH_4TE__ 1" (where we want to extract the 4)
|
# 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,')"
|
||||||
elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
|
elif [ -n "$(echo $cpp_defines | grep -w __mips__)" ]; then
|
||||||
arch="mips" # FIXME: autodetect version (32 or 64)
|
arch="mips"
|
||||||
|
arch_version="$(echo $cpp_defines | tr ' ' '\012' | grep _MIPS_ARCH_MIPS | sed -e 's,.*\([0-9][0-9]\).*,\1,')"
|
||||||
elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
|
elif [ -n "$(echo $cpp_defines | grep -w __i386__)" ]; then
|
||||||
arch="x86"
|
arch="x86"
|
||||||
elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
|
elif [ -n "$(echo $cpp_defines | grep -w __x86_64__)" ]; then
|
||||||
|
@ -3835,7 +3833,7 @@ cat > autoconf.h <<EOF
|
||||||
|
|
||||||
/* Define target machine architecture */
|
/* Define target machine architecture */
|
||||||
#define ARCH ${arch}
|
#define ARCH ${arch}
|
||||||
/* Optinally define architecture version */
|
/* Optionally define architecture version */
|
||||||
${Darch_version}
|
${Darch_version}
|
||||||
|
|
||||||
/* Define endianess for the target or simulator platform */
|
/* Define endianess for the target or simulator platform */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue