FreeBSD: start to reintroduce support - WIP

This commit is contained in:
Christian Jullien 2020-12-08 06:55:50 +01:00
parent 591feda103
commit f9c580b8a0
2 changed files with 7 additions and 2 deletions

View File

@ -223,6 +223,9 @@ typedef struct alloca_list_struct {
#elif defined(__OpenBSD__)
#define BOUND_TID_TYPE pid_t
#define BOUND_GET_TID syscall (SYS_getthrid)
#elif defined(__FreeBSD__)
#define BOUND_TID_TYPE pid_t
#define BOUND_GET_TID 0
#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
#define BOUND_TID_TYPE pid_t
#define BOUND_GET_TID syscall (SYS_gettid)

View File

@ -937,8 +937,10 @@ LIBTCCAPI TCCState *tcc_new(void)
# ifdef __FreeBSD__
/* define __GNUC__ to have some useful stuff from sys/cdefs.h
that are unconditionally used in FreeBSDs other system headers :/ */
tcc_define_symbol(s, "__GNUC__", "2");
tcc_define_symbol(s, "__GNUC_MINOR__", "7");
tcc_define_symbol(s, "__GNUC__", "9");
tcc_define_symbol(s, "__GNUC_MINOR__", "3");
tcc_define_symbol(s, "__GNUC_PATCHLEVEL__", "0");
tcc_define_symbol(s, "__amd64__", "1");
tcc_define_symbol(s, "__builtin_alloca", "alloca");
# endif
# else