History

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.

Thomas Preud'homme committed 12 years ago

Commit e50f08f1 parent 33cea541 file · +5 −5Browse files

Unified · Split

lib/libtcc1.c+5−5
@@ -107,10 +107,10 @@ union float_long { · 106 unmodified lines
107107 };
108108
109109 /* 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)
111111
112112 /* XXX: use gcc/tcc intrinsic ? */
113−#if defined(__i386__)
113+#if defined(TCC_TARGET_I386)
114114 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
115115 __asm__ ("subl %5,%1\n\tsbbl %3,%0" \
116116 : "=r" ((USItype) (sh)), \
@@ -619,7 +619,7 @@ long long __fixxfdi (long double a1) · 502 unmodified lines
619619 return s ? ret : -ret;
620620 }
621621
622−#if defined(__x86_64__) && !defined(_WIN64)
622+#if defined(TCC_TARGET_X86_64) && !defined(_WIN64)
623623
624624 #ifndef __TINYC__
625625 #include <stdlib.h>
@@ -710,13 +710,13 @@ void __va_end(struct __va_list_struct *ap) · 84 unmodified lines
710710 #endif /* __x86_64__ */
711711
712712 /* Flushing for tccrun */
713−#if defined(__x86_64__) || defined(__i386__)
713+#if defined(TCC_TARGET_X86_64) || defined(TCC_TARGET_I386)
714714
715715 void __clear_cache(char *beginning, char *end)
716716 {
717717 }
718718
719−#elif defined(__arm__)
719+#elif defined(TCC_TARGET_ARM)
720720
721721 #define _GNU_SOURCE
722722 #include <unistd.h>

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