aboutsummaryrefslogtreecommitdiff
path: root/tcctok.h
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji _at_ gmail.com>2009-04-01 03:45:18 +0900
committergrischka <grischka>2009-04-18 15:07:09 +0200
commitebb874e2164308b1b9a53a2b1f6d1b9f65894059 (patch)
tree8f20f558fe52bac208014ab4d8609ec6ad58bcff /tcctok.h
parent6512d9e2eac343c8419f61866ec7b866e19bf2c4 (diff)
downloadtinycc-ebb874e2164308b1b9a53a2b1f6d1b9f65894059.tar.gz
tinycc-ebb874e2164308b1b9a53a2b1f6d1b9f65894059.tar.bz2
Remove multiple definition error caused by combination of x86-64 and va_list.
We need malloc and free to implement va_start and va_end. Since malloc and free may be replaced by #define, we add __builtin_malloc and __builtin_free.
Diffstat (limited to 'tcctok.h')
-rw-r--r--tcctok.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcctok.h b/tcctok.h
index ef7bf7a..33bed29 100644
--- a/tcctok.h
+++ b/tcctok.h
@@ -110,6 +110,10 @@
DEF(TOK_builtin_types_compatible_p, "__builtin_types_compatible_p")
DEF(TOK_builtin_constant_p, "__builtin_constant_p")
DEF(TOK_builtin_frame_address, "__builtin_frame_address")
+#ifdef TCC_TARGET_X86_64
+ DEF(TOK_builtin_malloc, "__builtin_malloc")
+ DEF(TOK_builtin_free, "__builtin_free")
+#endif
DEF(TOK_REGPARM1, "regparm")
DEF(TOK_REGPARM2, "__regparm__")