macos: bound_alloca symbol adjust

so that tests/boundtest.c links as well.
This commit is contained in:
Michael Matz 2020-05-22 06:29:18 +02:00
parent f2e154e1e5
commit f486b19f56
2 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,11 @@
/* ---------------------------------------------- */
/* alloca86_64.S */
#ifdef __APPLE__
#define __bound_alloca ___bound_alloca
#define __bound_alloca_nr ___bound_alloca_nr
#endif
.globl __bound_alloca
__bound_alloca:

View File

@ -56,6 +56,9 @@
#ifdef TCC_TARGET_PE
#include "tccpe.c"
#endif
#ifdef TCC_TARGET_MACHO
#include "tccmacho.c"
#endif
#endif /* ONE_SOURCE */
#include "tcc.h"
@ -944,6 +947,7 @@ LIBTCCAPI TCCState *tcc_new(void)
tcc_define_symbol(s, "__APPLE__", "1");
tcc_define_symbol(s, "__GNUC__", "4"); /* darwin emits warning on GCC<4 */
tcc_define_symbol(s, "__APPLE_CC__", "1"); /* for <TargetConditionals.h> */
tcc_define_symbol(s, "__builtin_alloca", "alloca"); /* as we claim GNUC */
/* avoids usage of GCC/clang specific builtins in libc-headerfiles: */
tcc_define_symbol(s, "__FINITE_MATH_ONLY__", "1");