mimalloc, new recipe (#9059)

This commit is contained in:
Schrijvers Luc
2023-07-23 08:49:48 +02:00
committed by GitHub
parent 2abad24440
commit b457621253
2 changed files with 119 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
From 6c72e7b0df1484c7f8a6a1967030b31f6d6790d0 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Fri, 21 Jul 2023 12:49:43 +0000
Subject: Don't hardcode install paths
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2bcd1ef..72ea2f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,11 +262,6 @@ if(MI_USE_CXX)
endif()
endif()
-if(CMAKE_SYSTEM_NAME MATCHES "Haiku")
- SET(CMAKE_INSTALL_LIBDIR ~/config/non-packaged/lib)
- SET(CMAKE_INSTALL_INCLUDEDIR ~/config/non-packaged/headers)
- endif()
-
# Compiler flags
if(CMAKE_C_COMPILER_ID MATCHES "AppleClang|Clang|GNU")
list(APPEND mi_cflags -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden)
--
2.37.3
From ad9c184f58d2f1bec4907a86dd9b6faaba9c5274 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Fri, 21 Jul 2023 13:54:29 +0000
Subject: Fix missing header on Haiku
diff --git a/src/prim/unix/prim.c b/src/prim/unix/prim.c
index 314281f..605a684 100644
--- a/src/prim/unix/prim.c
+++ b/src/prim/unix/prim.c
@@ -55,6 +55,10 @@ terms of the MIT license. A copy of the license can be found in the file
#include <sys/syscall.h>
#endif
+#if defined(__HAIKU__)
+#include <fcntl.h>
+#endif
+
//------------------------------------------------------------------------------------
// Use syscalls for some primitives to allow for libraries that override open/read/close etc.
// and do allocation themselves; using syscalls prevents recursion when mimalloc is
--
2.37.3