diff options
| author | Thomas Preud'homme <robotux@celest.fr> | 2014-03-09 22:15:01 +0800 |
|---|---|---|
| committer | Thomas Preud'homme <robotux@celest.fr> | 2014-03-09 22:15:01 +0800 |
| commit | e50f08faa19d66f2d2fd0e3bab4dda3852100d72 (patch) | |
| tree | 1057c24917e84ca3c5bdc9735cbe3aa771b9e9ed /lib/libtcc1.c | |
| parent | 33cea54dc7b18e865c355dc1a7fee3a08a63d587 (diff) | |
| download | tinycc-e50f08faa19d66f2d2fd0e3bab4dda3852100d72.tar.gz tinycc-e50f08faa19d66f2d2fd0e3bab4dda3852100d72.tar.bz2 | |
Make condition in libtcc1 based on target
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.
Diffstat (limited to 'lib/libtcc1.c')
| -rw-r--r-- | lib/libtcc1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libtcc1.c b/lib/libtcc1.c index 44208cd..cf9babf 100644 --- a/lib/libtcc1.c +++ b/lib/libtcc1.c @@ -107,10 +107,10 @@ union float_long { }; /* XXX: we don't support several builtin supports for now */ -#if !defined(__x86_64__) && !defined(__arm__) +#if !defined(TCC_TARGET_X86_64) && !defined(TCC_TARGET_ARM) /* XXX: use gcc/tcc intrinsic ? */ -#if defined(__i386__) +#if defined(TCC_TARGET_I386) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ __asm__ ("subl %5,%1\n\tsbbl %3,%0" \ : "=r" ((USItype) (sh)), \ @@ -619,7 +619,7 @@ long long __fixxfdi (long double a1) return s ? ret : -ret; } -#if defined(__x86_64__) && !defined(_WIN64) +#if defined(TCC_TARGET_X86_64) && !defined(_WIN64) #ifndef __TINYC__ #include <stdlib.h> @@ -710,13 +710,13 @@ void __va_end(struct __va_list_struct *ap) #endif /* __x86_64__ */ /* Flushing for tccrun */ -#if defined(__x86_64__) || defined(__i386__) +#if defined(TCC_TARGET_X86_64) || defined(TCC_TARGET_I386) void __clear_cache(char *beginning, char *end) { } -#elif defined(__arm__) +#elif defined(TCC_TARGET_ARM) #define _GNU_SOURCE #include <unistd.h> |
