1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 04:07:34 +00:00
serenity/Ports/mold/patches/0002-Tell-TBB-that-SerenityOS-libraries-are-named-like-BS.patch
Andrew Kaster 32c9be30dc Ports/mold: Update to 1.5.1 and use CMake instead of Makefile
Per the release notes for 1.5.0, the CMake build is preferred going
forward. This lets us drop some Makefile patches and pass them as CMake
options instead, with the exception of disabling mold-wrapper.so.
2022-10-03 10:01:06 +01:00

38 lines
2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andrew Kaster <akaster@serenityos.org>
Date: Sun, 23 Jan 2022 17:50:52 -0700
Subject: [PATCH] Tell TBB that SerenityOS libraries are named like BSD ones
We won't be loading these libraries when building TBB as a static
library for mold, but the OS detection logic still needs updated.
---
third-party/tbb/src/tbb/allocator.cpp | 2 +-
third-party/tbb/src/tbb/rml_tbb.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/third-party/tbb/src/tbb/allocator.cpp b/third-party/tbb/src/tbb/allocator.cpp
index f30ded675f1372d572f4156489b15655cd302b2e..0acccef4b2521eee061e4df0aa8dd055e57f41c3 100644
--- a/third-party/tbb/src/tbb/allocator.cpp
+++ b/third-party/tbb/src/tbb/allocator.cpp
@@ -101,7 +101,7 @@ static const dynamic_link_descriptor MallocLinkTable[] = {
#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll"
#elif __APPLE__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib"
-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__
+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ || __serenity__
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so"
#elif __unix__ // Note that order of these #elif's is important!
#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so.2"
diff --git a/third-party/tbb/src/tbb/rml_tbb.cpp b/third-party/tbb/src/tbb/rml_tbb.cpp
index d31a77fb6ff25ef86557daf946aeefe8fe9db5ca..fb676bc90ec22c624b13835f77b5dda1c8d99d93 100644
--- a/third-party/tbb/src/tbb/rml_tbb.cpp
+++ b/third-party/tbb/src/tbb/rml_tbb.cpp
@@ -50,7 +50,7 @@ namespace rml {
#define RML_SERVER_NAME "irml" DEBUG_SUFFIX ".dll"
#elif __APPLE__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".dylib"
-#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX
+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __serenity__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so"
#elif __unix__
#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so.1"