diff options
author | Bartek Rutkowski <robak@FreeBSD.org> | 2015-08-05 13:18:22 +0000 |
---|---|---|
committer | Bartek Rutkowski <robak@FreeBSD.org> | 2015-08-05 13:18:22 +0000 |
commit | d69c2fb4f334175f3150dca5c354ef02454f2407 (patch) | |
tree | 078d39c5c12c7e9026283f8341a5d396e07d989f /lang/tcc/files/patch-libtcc.c | |
parent | - Switch to USES=tar (diff) |
lang/tcc: fix stdio.h bug
PR: 202093
Submitted by: Carlos J Puga Medina <cpm@fbsd.es> (maintainer)
MFH: 2015Q3
Notes
Notes:
svn path=/head/; revision=393585
Diffstat (limited to 'lang/tcc/files/patch-libtcc.c')
-rw-r--r-- | lang/tcc/files/patch-libtcc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lang/tcc/files/patch-libtcc.c b/lang/tcc/files/patch-libtcc.c new file mode 100644 index 000000000000..0df9ac88dcdd --- /dev/null +++ b/lang/tcc/files/patch-libtcc.c @@ -0,0 +1,28 @@ +--- libtcc.c.orig 2013-02-15 14:24:00 UTC ++++ libtcc.c +@@ -931,7 +931,11 @@ LIBTCCAPI TCCState *tcc_new(void) + tcc_define_symbol(s, "__i386", NULL); + tcc_define_symbol(s, "i386", NULL); + #elif defined(TCC_TARGET_X86_64) ++# if defined(__FreeBSD__) ++ tcc_define_symbol(s, "__amd64__", NULL); ++# endif + tcc_define_symbol(s, "__x86_64__", NULL); ++ tcc_define_symbol(s, "__LP64__", NULL); + #elif defined(TCC_TARGET_ARM) + tcc_define_symbol(s, "__ARM_ARCH_4__", NULL); + tcc_define_symbol(s, "__arm_elf__", NULL); +@@ -957,6 +961,13 @@ LIBTCCAPI TCCState *tcc_new(void) + tcc_define_symbol(s, "__linux", NULL); + # endif + # if defined(__FreeBSD__) ++# if defined(DEFINE_VA_LIST) ++# if defined(TCC_TARGET_X86_64) ++ tcc_define_symbol(s, "__va_list", "struct { long pad[3]; }"); ++# else ++ tcc_define_symbol(s, "__va_list", "char *"); ++# endif ++# endif + # define str(s) #s + tcc_define_symbol(s, "__FreeBSD__", str( __FreeBSD__)); + # undef str |