aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2012-12-04 11:17:51 +0100
committerThomas Preud'homme <robotux@celest.fr>2012-12-04 11:17:51 +0100
commitc4a18f47a24ccc1345944120faf52a983be8fa33 (patch)
tree9f592816925cb3f4315ae8248c2b9a97d760c4a5 /configure
parent8d90205fd933fbc8d36c935840d584a019a6be52 (diff)
downloadtinycc-c4a18f47a24ccc1345944120faf52a983be8fa33.tar.gz
tinycc-c4a18f47a24ccc1345944120faf52a983be8fa33.tar.bz2
Detect ARM CPU version in configure
Instead of guessing the ARM CPU version to compile for from tcc.h, we now detect it in configure and output the value in config.h
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 16 insertions, 1 deletions
diff --git a/configure b/configure
index 11ebf8c..a400524 100755
--- a/configure
+++ b/configure
@@ -51,7 +51,21 @@ case "$cpu" in
x86_64)
cpu="x86-64"
;;
- arm|armv4l|armv5tel|armv5tejl|armv6j|armv6l|armv7a|armv7l)
+ arm*)
+ case "$cpu" in
+ arm|armv4l)
+ cpuver=4
+ ;;
+ armv5tel|armv5tejl)
+ cpuver=5
+ ;;
+ armv6j|armv6l)
+ cpuver=6
+ ;;
+ armv7a|armv7l)
+ cpuver=7
+ ;;
+ esac
cpu="armv4l"
;;
alpha)
@@ -411,6 +425,7 @@ elif test "$cpu" = "x86-64" ; then
elif test "$cpu" = "armv4l" ; then
echo "ARCH=arm" >> config.mak
echo "#define HOST_ARM 1" >> $TMPH
+ echo "#define TCC_ARM_VERSION $cpuver" >> $TMPH
elif test "$cpu" = "powerpc" ; then
echo "ARCH=ppc" >> config.mak
echo "#define HOST_PPC 1" >> $TMPH