summaryrefslogtreecommitdiff
path: root/Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-10-02 21:01:33 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-03 10:01:06 +0100
commit32c9be30dc4a34394988dfaa81d46c63d07fde70 (patch)
treea074cfa424a2e34b960c952b29b8d209675b8545 /Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch
parent376425639d032b29a42ca5354eb11a08ce8b991b (diff)
downloadserenity-32c9be30dc4a34394988dfaa81d46c63d07fde70.zip
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.
Diffstat (limited to 'Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch')
-rw-r--r--Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch b/Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch
new file mode 100644
index 0000000000..50cf1e8827
--- /dev/null
+++ b/Ports/mold/patches/0001-Tell-TBB-that-SerenityOS-does-not-support-weak-symbo.patch
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Andrew Kaster <akaster@serenityos.org>
+Date: Tue, 11 Jan 2022 01:04:05 -0700
+Subject: [PATCH] Tell TBB that SerenityOS does not support weak symbols
+
+Something about the Clang toolchain configuration causes undefined weak
+references to scalable_malloc to remain in the mold executable even
+though there's no chance we'll be loading the tbbmalloc library at
+runtime. So, just lie to TBB that we don't support weak symbols.
+---
+ third-party/tbb/include/oneapi/tbb/detail/_config.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third-party/tbb/include/oneapi/tbb/detail/_config.h b/third-party/tbb/include/oneapi/tbb/detail/_config.h
+index fa287cd2968ec7f336b754ee450a8da12f4ded23..b93878aa6369a8ffe386da4dd822ab5bd1fe3c3b 100644
+--- a/third-party/tbb/include/oneapi/tbb/detail/_config.h
++++ b/third-party/tbb/include/oneapi/tbb/detail/_config.h
+@@ -195,7 +195,7 @@
+
+ /** __TBB_WEAK_SYMBOLS_PRESENT denotes that the system supports the weak symbol mechanism **/
+ #ifndef __TBB_WEAK_SYMBOLS_PRESENT
+- #define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) )
++ #define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && !__serenity__ && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) )
+ #endif
+
+ /** Presence of compiler features **/