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
5151 x86_64)
5252 cpu="x86-64"
5353 ;;
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
5569 cpu="armv4l"
5670 ;;
5771 alpha)
@@ -411,6 +425,7 @@ elif test "$cpu" = "x86-64" ; then · 353 unmodified lines
411425 elif test "$cpu" = "armv4l" ; then
412426 echo "ARCH=arm" >> config.mak
413427 echo "#define HOST_ARM 1" >> $TMPH
428+ echo "#define TCC_ARM_VERSION $cpuver" >> $TMPH
414429 elif test "$cpu" = "powerpc" ; then
415430 echo "ARCH=ppc" >> config.mak
416431 echo "#define HOST_PPC 1" >> $TMPH
tcc.h+0−8
@@ -105,14 +105,6 @@ · 104 unmodified lines
105105 #define TCC_TARGET_I386
106106 #endif
107107
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−
116108 #if !defined(TCC_UCLIBC) && !defined(TCC_TARGET_ARM) && \
117109 !defined(TCC_TARGET_C67) && !defined(TCC_TARGET_X86_64)
118110 #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