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
383 DragonFly|OpenBSD|FreeBSD|NetBSD)383 DragonFly|OpenBSD|FreeBSD|NetBSD)
384 confvars_set BSD ldl=no384 confvars_set BSD ldl=no
385 ;;385 ;;
386 Haiku)
387 confvars_set ldl=no
388 ;;
386 Android|Termux)389 Android|Termux)
387 if test "$targetos" = "Termux"; then390 if test "$targetos" = "Termux"; then
388 targetos=Android391 targetos=Android
tccrun.c+11−2
@@ -1207,7 +1207,7 @@ static int rt_error(rt_frame *f, const char *fmt, ...) · 1206 unmodified lines
1207 1207
1208#ifndef _WIN321208#ifndef _WIN32
1209# include <signal.h>1209# include <signal.h>
1210# ifndef __OpenBSD__1210# if !defined(__OpenBSD__) && !defined(__HAIKU__)
1211# include <sys/ucontext.h>1211# include <sys/ucontext.h>
1212# endif1212# endif
1213#else1213#else
@@ -1236,7 +1236,7 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 22 unmodified lines
1236# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)1236# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
1237 rc->ip = uc->uc_mcontext.mc_eip;1237 rc->ip = uc->uc_mcontext.mc_eip;
1238 rc->fp = uc->uc_mcontext.mc_ebp;1238 rc->fp = uc->uc_mcontext.mc_ebp;
1239# elif defined(__dietlibc__)1239# elif defined(__dietlibc__) || defined(__HAIKU__)
1240 rc->ip = uc->uc_mcontext.eip;1240 rc->ip = uc->uc_mcontext.eip;
1241 rc->fp = uc->uc_mcontext.ebp;1241 rc->fp = uc->uc_mcontext.ebp;
1242# elif defined(__NetBSD__)1242# elif defined(__NetBSD__)
@@ -1265,6 +1265,9 @@ static void rt_getcontext(ucontext_t *uc, rt_frame *rc) · 22 unmodified lines
1265# elif defined(__OpenBSD__)1265# elif defined(__OpenBSD__)
1266 rc->ip = uc->sc_rip;1266 rc->ip = uc->sc_rip;
1267 rc->fp = uc->sc_rbp;1267 rc->fp = uc->sc_rbp;
1268# elif defined(__HAIKU__)
1269 rc->ip = uc->uc_mcontext.rip;
1270 rc->fp = uc->uc_mcontext.rbp;
1268# else1271# else
1269 rc->ip = uc->uc_mcontext.gregs[REG_RIP];1272 rc->ip = uc->uc_mcontext.gregs[REG_RIP];
1270 rc->fp = uc->uc_mcontext.gregs[REG_RBP];1273 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
1275#elif defined(__arm__) && defined(__OpenBSD__)1278#elif defined(__arm__) && defined(__OpenBSD__)
1276 rc->ip = uc->sc_pc;1279 rc->ip = uc->sc_pc;
1277 rc->fp = uc->sc_r11;1280 rc->fp = uc->sc_r11;
1281#elif defined(__arm__) && defined(__HAIKU__)
1282 rc->ip = uc->r15;
1283 rc->fp = uc->r11;
1278#elif defined(__arm__) && defined(__FreeBSD__)1284#elif defined(__arm__) && defined(__FreeBSD__)
1279 rc->ip = uc->uc_mcontext.__gregs[_REG_PC];1285 rc->ip = uc->uc_mcontext.__gregs[_REG_PC];
1280 rc->fp = uc->uc_mcontext.__gregs[_REG_FP];1286 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
1295#elif defined(__aarch64__) && defined(__OpenBSD__)1301#elif defined(__aarch64__) && defined(__OpenBSD__)
1296 rc->ip = uc->sc_elr;1302 rc->ip = uc->sc_elr;
1297 rc->fp = uc->sc_x[29];1303 rc->fp = uc->sc_x[29];
1304#elif defined(__aarch64__) && defined(__HAIKU__)
1305 rc->ip = uc->elr;
1306 rc->fp = uc->x[29];
1298#elif defined(__aarch64__)1307#elif defined(__aarch64__)
1299 rc->ip = uc->uc_mcontext.pc;1308 rc->ip = uc->uc_mcontext.pc;
1300 rc->fp = uc->uc_mcontext.regs[29];1309 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