History

[NOMERGE]: fix the build on Haiku OS

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit f829c301 parent 7327aa22 files · +14 −2Browse files

Unified · Split

2 files
  1. configure +3 −0
  2. tccrun.c +11 −2
configure+3−0
@@ -383,6 +383,9 @@ case $targetos in · 382 unmodified lines
383383 DragonFly|OpenBSD|FreeBSD|NetBSD)
384384 confvars_set BSD ldl=no
385385 ;;
386+ Haiku)
387+ confvars_set ldl=no
388+ ;;
386389 Android|Termux)
387390 if test "$targetos" = "Termux"; then
388391 targetos=Android
tccrun.c+11−2
@@ -1207,7 +1207,7 @@ static int rt_error(rt_frame *f, const char *fmt, ...) · 1206 unmodified lines
12071207
12081208 #ifndef _WIN32
12091209 # include <signal.h>
1210−# ifndef __OpenBSD__
1210+# if !defined(__OpenBSD__) && !defined(__HAIKU__)
12111211 # include <sys/ucontext.h>
12121212 # endif
12131213 #else
@@ -1236,7 +1236,7 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 22 unmodified lines
12361236 # elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
12371237 rc->ip = uc->uc_mcontext.mc_eip;
12381238 rc->fp = uc->uc_mcontext.mc_ebp;
1239−# elif defined(__dietlibc__)
1239+# elif defined(__dietlibc__) || defined(__HAIKU__)
12401240 rc->ip = uc->uc_mcontext.eip;
12411241 rc->fp = uc->uc_mcontext.ebp;
12421242 # elif defined(__NetBSD__)
@@ -1265,6 +1265,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 22 unmodified lines
12651265 # elif defined(__OpenBSD__)
12661266 rc->ip = uc->sc_rip;
12671267 rc->fp = uc->sc_rbp;
1268+# elif defined(__HAIKU__)
1269+ rc->ip = uc->uc_mcontext.rip;
1270+ rc->fp = uc->uc_mcontext.rbp;
12681271 # else
12691272 rc->ip = uc->uc_mcontext.gregs[REG_RIP];
12701273 rc->fp = uc->uc_mcontext.gregs[REG_RBP];
@@ -1275,6 +1278,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 4 unmodified lines
12751278 #elif defined(__arm__) && defined(__OpenBSD__)
12761279 rc->ip = uc->sc_pc;
12771280 rc->fp = uc->sc_r11;
1281+#elif defined(__arm__) && defined(__HAIKU__)
1282+ rc->ip = uc->r15;
1283+ rc->fp = uc->r11;
12781284 #elif defined(__arm__) && defined(__FreeBSD__)
12791285 rc->ip = uc->uc_mcontext.__gregs[_REG_PC];
12801286 rc->fp = uc->uc_mcontext.__gregs[_REG_FP];
@@ -1295,6 +1301,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 14 unmodified lines
12951301 #elif defined(__aarch64__) && defined(__OpenBSD__)
12961302 rc->ip = uc->sc_elr;
12971303 rc->fp = uc->sc_x[29];
1304+#elif defined(__aarch64__) && defined(__HAIKU__)
1305+ rc->ip = uc->elr;
1306+ rc->fp = uc->x[29];
12981307 #elif defined(__aarch64__)
12991308 rc->ip = uc->uc_mcontext.pc;
13001309 rc->fp = uc->uc_mcontext.regs[29];

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