mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 22:00:09 +02:00
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
From 34946f2c489cd7448f8d2ddb6575e7f71a1c80e7 Mon Sep 17 00:00:00 2001
|
|
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
|
|
Date: Mon, 16 Aug 2021 09:28:50 +0300
|
|
Subject: gcc2 fix.
|
|
|
|
|
|
diff --git a/include/ffi_common.h b/include/ffi_common.h
|
|
index a9839b3..4676094 100644
|
|
--- a/include/ffi_common.h
|
|
+++ b/include/ffi_common.h
|
|
@@ -171,7 +171,7 @@ typedef signed int SINT64 __attribute__((__mode__(__DI__)));
|
|
|
|
typedef float FLOAT32;
|
|
|
|
-#ifndef __GNUC__
|
|
+#if !defined(__GNUC__) || __GNUC__ < 3
|
|
#define __builtin_expect(x, expected_value) (x)
|
|
#endif
|
|
#define LIKELY(x) __builtin_expect(!!(x),1)
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From 0326e69b99561fbeded2d58bdbd4e6e93af95acd Mon Sep 17 00:00:00 2001
|
|
From: Michael Lotz <mmlr@mlotz.ch>
|
|
Date: Mon, 16 Aug 2021 09:29:06 +0300
|
|
Subject: Mark Haiku as needing PROT_WRITE | PROTO_EXEC for allocations.
|
|
|
|
It uses the heap as a fallback, but its areas are marked non-executable
|
|
in Haiku so function calls into there will segfault with a permission
|
|
denied error.
|
|
|
|
diff --git a/configure b/configure
|
|
index bcbbd44..7086b47 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -19350,7 +19350,7 @@ case "$target" in
|
|
printf "%s\n" "#define FFI_EXEC_TRAMPOLINE_TABLE 1" >>confdefs.h
|
|
|
|
;;
|
|
- *-apple-* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android*)
|
|
+ *-apple-* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris* | *-linux-android* | *-*-haiku*)
|
|
|
|
printf "%s\n" "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
|
|
|
|
--
|
|
2.45.2
|
|
|