Prior to this commit runtime library was compiled according to the host because of the macro used to detec what architecture to choose. This commit fixes this by using the TARGET_* macro instead.
Unified · Split
| @@ -107,10 +107,10 @@ union float_long { · 106 unmodified lines | |||
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | /* XXX: we don't support several builtin supports for now */ | 109 | /* XXX: we don't support several builtin supports for now */ |
| 110 | #if !defined(__x86_64__) && !defined(__arm__) | 110 | #if !defined(TCC_TARGET_X86_64) && !defined(TCC_TARGET_ARM) |
| 111 | 111 | ||
| 112 | /* XXX: use gcc/tcc intrinsic ? */ | 112 | /* XXX: use gcc/tcc intrinsic ? */ |
| 113 | #if defined(__i386__) | 113 | #if defined(TCC_TARGET_I386) |
| 114 | #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ | 114 | #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ |
| 115 | __asm__ ("subl %5,%1\n\tsbbl %3,%0" \ | 115 | __asm__ ("subl %5,%1\n\tsbbl %3,%0" \ |
| 116 | : "=r" ((USItype) (sh)), \ | 116 | : "=r" ((USItype) (sh)), \ |
| @@ -619,7 +619,7 @@ long long __fixxfdi (long double a1) · 502 unmodified lines | |||
| 619 | return s ? ret : -ret; | 619 | return s ? ret : -ret; |
| 620 | } | 620 | } |
| 621 | 621 | ||
| 622 | #if defined(__x86_64__) && !defined(_WIN64) | 622 | #if defined(TCC_TARGET_X86_64) && !defined(_WIN64) |
| 623 | 623 | ||
| 624 | #ifndef __TINYC__ | 624 | #ifndef __TINYC__ |
| 625 | #include <stdlib.h> | 625 | #include <stdlib.h> |
| @@ -710,13 +710,13 @@ void __va_end(struct __va_list_struct *ap) · 84 unmodified lines | |||
| 710 | #endif /* __x86_64__ */ | 710 | #endif /* __x86_64__ */ |
| 711 | 711 | ||
| 712 | /* Flushing for tccrun */ | 712 | /* Flushing for tccrun */ |
| 713 | #if defined(__x86_64__) || defined(__i386__) | 713 | #if defined(TCC_TARGET_X86_64) || defined(TCC_TARGET_I386) |
| 714 | 714 | ||
| 715 | void __clear_cache(char *beginning, char *end) | 715 | void __clear_cache(char *beginning, char *end) |
| 716 | { | 716 | { |
| 717 | } | 717 | } |
| 718 | 718 | ||
| 719 | #elif defined(__arm__) | 719 | #elif defined(TCC_TARGET_ARM) |
| 720 | 720 | ||
| 721 | #define _GNU_SOURCE | 721 | #define _GNU_SOURCE |
| 722 | #include <unistd.h> | 722 | #include <unistd.h> |