Drop compatibility patch for mimalloc < 2.0.6 on epel8
Now that mimalloc 2.0.6 is available there, it is no longer needed.
This commit is contained in:
parent
d86874335d
commit
fd35a6b727
|
@ -1,40 +0,0 @@
|
||||||
From d068fb0caae8c8db97ee59ba400929f5f97f8be1 Mon Sep 17 00:00:00 2001
|
|
||||||
Message-Id: <d068fb0caae8c8db97ee59ba400929f5f97f8be1.1650123861.git.github@sicherha.de>
|
|
||||||
From: Christoph Erhardt <github@sicherha.de>
|
|
||||||
Date: Tue, 22 Feb 2022 21:21:18 +0100
|
|
||||||
Subject: [PATCH] Fix compatibility with libstdc++ < 9
|
|
||||||
|
|
||||||
mimalloc does not override the `nothrow` variants of the `delete`
|
|
||||||
operator because it assumes that their implementation in libstdc++
|
|
||||||
redirects to the default `delete` operators. This is not the case for
|
|
||||||
libstdc++ < 9, where `std::free()` is called directly.
|
|
||||||
|
|
||||||
Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
|
|
||||||
|
|
||||||
This patch ensures that the `nothrow` `delete` operators are overridden
|
|
||||||
as well.
|
|
||||||
---
|
|
||||||
main.cc | 7 +++++++
|
|
||||||
1 file changed, 7 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/main.cc b/main.cc
|
|
||||||
index b390b0f7..5c1f5450 100644
|
|
||||||
--- a/main.cc
|
|
||||||
+++ b/main.cc
|
|
||||||
@@ -6,6 +6,13 @@
|
|
||||||
|
|
||||||
#ifdef USE_SYSTEM_MIMALLOC
|
|
||||||
#include <mimalloc-new-delete.h>
|
|
||||||
+
|
|
||||||
+// Additionally override the nothrow delete operators for compatibility with
|
|
||||||
+// buggy libstdc++ < 9
|
|
||||||
+#if MI_MALLOC_VERSION < 206
|
|
||||||
+void operator delete(void* p, const std::nothrow_t&) noexcept { mi_free(p); }
|
|
||||||
+void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); }
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace mold {
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
|
@ -17,10 +17,6 @@ Patch0: tbb-strip-werror.patch
|
||||||
# Skip test if dwarfdump is unavailable
|
# Skip test if dwarfdump is unavailable
|
||||||
Patch1: 0001-Skip-test-if-dwarfdump-is-unavailable.patch
|
Patch1: 0001-Skip-test-if-dwarfdump-is-unavailable.patch
|
||||||
|
|
||||||
# Fix mimalloc compatibility with libstdc++ < 9:
|
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210
|
|
||||||
Patch2: 0002-Fix-compatibility-with-libstdc-9.patch
|
|
||||||
|
|
||||||
# mold can produce native binaries for i686, x86_64, ARMv7, aarch64 and riscv64,
|
# mold can produce native binaries for i686, x86_64, ARMv7, aarch64 and riscv64,
|
||||||
# but it only runs on a 64-bit host
|
# but it only runs on a 64-bit host
|
||||||
ExclusiveArch: x86_64 aarch64 riscv64
|
ExclusiveArch: x86_64 aarch64 riscv64
|
||||||
|
|
Loading…
Reference in New Issue