Line 0
Link Here
|
|
|
1 |
--- libtcc.c.orig 2013-02-15 14:24:00 UTC |
2 |
+++ libtcc.c |
3 |
@@ -931,7 +931,11 @@ LIBTCCAPI TCCState *tcc_new(void) |
4 |
tcc_define_symbol(s, "__i386", NULL); |
5 |
tcc_define_symbol(s, "i386", NULL); |
6 |
#elif defined(TCC_TARGET_X86_64) |
7 |
+# if defined(__FreeBSD__) |
8 |
+ tcc_define_symbol(s, "__amd64__", NULL); |
9 |
+# endif |
10 |
tcc_define_symbol(s, "__x86_64__", NULL); |
11 |
+ tcc_define_symbol(s, "__LP64__", NULL); |
12 |
#elif defined(TCC_TARGET_ARM) |
13 |
tcc_define_symbol(s, "__ARM_ARCH_4__", NULL); |
14 |
tcc_define_symbol(s, "__arm_elf__", NULL); |
15 |
@@ -957,6 +961,13 @@ LIBTCCAPI TCCState *tcc_new(void) |
16 |
tcc_define_symbol(s, "__linux", NULL); |
17 |
# endif |
18 |
# if defined(__FreeBSD__) |
19 |
+# if defined(DEFINE_VA_LIST) |
20 |
+# if defined(TCC_TARGET_X86_64) |
21 |
+ tcc_define_symbol(s, "__va_list", "struct { long pad[3]; }"); |
22 |
+# else |
23 |
+ tcc_define_symbol(s, "__va_list", "char *"); |
24 |
+# endif |
25 |
+# endif |
26 |
# define str(s) #s |
27 |
tcc_define_symbol(s, "__FreeBSD__", str( __FreeBSD__)); |
28 |
# undef str |