History

FreeBSD: start to reintroduce support - WIP

Christian Jullien committed 5 years ago

Commit f9c580b1 parent 591feda2 files · +7 −2Browse files

Unified · Split

2 files
  1. lib/bcheck.c +3 −0
  2. libtcc.c +4 −2
lib/bcheck.c+3−0
@@ -223,6 +223,9 @@ typedef struct alloca_list_struct { · 222 unmodified lines
223223 #elif defined(__OpenBSD__)
224224 #define BOUND_TID_TYPE pid_t
225225 #define BOUND_GET_TID syscall (SYS_getthrid)
226+#elif defined(__FreeBSD__)
227+#define BOUND_TID_TYPE pid_t
228+#define BOUND_GET_TID 0
226229 #elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
227230 #define BOUND_TID_TYPE pid_t
228231 #define BOUND_GET_TID syscall (SYS_gettid)
libtcc.c+4−2
@@ -937,8 +937,10 @@ LIBTCCAPI TCCState *tcc_new(void) · 936 unmodified lines
937937 # ifdef __FreeBSD__
938938 /* define __GNUC__ to have some useful stuff from sys/cdefs.h
939939 that are unconditionally used in FreeBSDs other system headers :/ */
940− tcc_define_symbol(s, "__GNUC__", "2");
941− tcc_define_symbol(s, "__GNUC_MINOR__", "7");
940+ tcc_define_symbol(s, "__GNUC__", "9");
941+ tcc_define_symbol(s, "__GNUC_MINOR__", "3");
942+ tcc_define_symbol(s, "__GNUC_PATCHLEVEL__", "0");
943+ tcc_define_symbol(s, "__amd64__", "1");
942944 tcc_define_symbol(s, "__builtin_alloca", "alloca");
943945 # endif
944946 # else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t