aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2014-03-09 22:15:01 +0800
committerThomas Preud'homme <robotux@celest.fr>2014-03-09 22:15:01 +0800
commite50f08faa19d66f2d2fd0e3bab4dda3852100d72 (patch)
tree1057c24917e84ca3c5bdc9735cbe3aa771b9e9ed /lib
parent33cea54dc7b18e865c355dc1a7fee3a08a63d587 (diff)
downloadtinycc-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')
-rw-r--r--lib/libtcc1.c10
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>