History

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

Thomas Preud'homme committed 13 years ago

Commit c4a18f41 parent 8d902052 files · +16 −9Browse files

Unified · Split

2 files
  1. configure +16 −1
  2. tcc.h +0 −8
configure+16−1
@@ -51,7 +51,21 @@ case "$cpu" in · 50 unmodified lines
51 x86_64)51 x86_64)
52 cpu="x86-64"52 cpu="x86-64"
53 ;;53 ;;
54 arm|armv4l|armv5tel|armv5tejl|armv6j|armv6l|armv7a|armv7l)54 arm*)
55 case "$cpu" in
56 arm|armv4l)
57 cpuver=4
58 ;;
59 armv5tel|armv5tejl)
60 cpuver=5
61 ;;
62 armv6j|armv6l)
63 cpuver=6
64 ;;
65 armv7a|armv7l)
66 cpuver=7
67 ;;
68 esac
55 cpu="armv4l"69 cpu="armv4l"
56 ;;70 ;;
57 alpha)71 alpha)
@@ -411,6 +425,7 @@ elif test "$cpu" = "x86-64" ; then · 353 unmodified lines
411elif test "$cpu" = "armv4l" ; then425elif test "$cpu" = "armv4l" ; then
412 echo "ARCH=arm" >> config.mak426 echo "ARCH=arm" >> config.mak
413 echo "#define HOST_ARM 1" >> $TMPH427 echo "#define HOST_ARM 1" >> $TMPH
428 echo "#define TCC_ARM_VERSION $cpuver" >> $TMPH
414elif test "$cpu" = "powerpc" ; then429elif test "$cpu" = "powerpc" ; then
415 echo "ARCH=ppc" >> config.mak430 echo "ARCH=ppc" >> config.mak
416 echo "#define HOST_PPC 1" >> $TMPH431 echo "#define HOST_PPC 1" >> $TMPH
tcc.h+0−8
@@ -105,14 +105,6 @@ · 104 unmodified lines
105#define TCC_TARGET_I386105#define TCC_TARGET_I386
106#endif106#endif
107 107
108#if defined (TCC_TARGET_ARM) && !defined(TCC_ARM_VERSION)
109 #ifdef TCC_ARM_HARDFLOAT
110 #define TCC_ARM_VERSION 7
111 #else
112 #define TCC_ARM_VERSION 4
113 #endif
114#endif
115
116#if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \108#if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \
117 !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64)109 !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64)
118#define CONFIG_TCC_BCHECK /* enable bound checking code */110#define CONFIG_TCC_BCHECK /* enable bound checking code */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t