aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-01-14 09:54:57 -0800
committerKhem Raj <raj.khem@gmail.com>2022-01-18 09:01:51 -0800
commitd49282245ce0ed88fdf3b319588033093f07bd3c (patch)
tree708699bd410df006c54357062e6390caaa183040 /meta-oe
parent18448441868b2db1c959b5993253952e084d4dea (diff)
downloadmeta-openembedded-contrib-d49282245ce0ed88fdf3b319588033093f07bd3c.tar.gz
meta-openembedded-contrib-d49282245ce0ed88fdf3b319588033093f07bd3c.tar.bz2
meta-openembedded-contrib-d49282245ce0ed88fdf3b319588033093f07bd3c.zip
jemalloc: Fix build with glibc 2.35+clang
Compiler crashes when using glibc 2.35, it should be fixed in clang but until then workaround it here. Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch33
-rw-r--r--meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb3
2 files changed, 36 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch b/meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch
new file mode 100644
index 0000000000..570202e800
--- /dev/null
+++ b/meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch
@@ -0,0 +1,33 @@
+From 3fe67deb9fcf0ae3c2ff31a9eccb6a0a9af33b9c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jan 2022 09:47:03 -0800
+Subject: [PATCH] test: Disable optimization with clang for aligned_alloc.c
+
+Clang crashes when using glibc 2.35, it works ok with older glibc or
+musl, so its very specific problem. Its reported here
+
+https://github.com/llvm/llvm-project/issues/52765
+
+Until it is fixed, workaround the build failure
+
+Upstream-Status: Inappropriate [Workaround]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ test/integration/aligned_alloc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/test/integration/aligned_alloc.c b/test/integration/aligned_alloc.c
+index 4375b172..6513bdd9 100644
+--- a/test/integration/aligned_alloc.c
++++ b/test/integration/aligned_alloc.c
+@@ -1,5 +1,7 @@
+ #include "test/jemalloc_test.h"
+
++#pragma clang optimize off
++
+ #define MAXALIGN (((size_t)1) << 23)
+
+ /*
+--
+2.34.1
+
diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index 17a04e11a9..8618c8c6a7 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -18,6 +18,9 @@ SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https \
file://run-ptest \
"
+# Workaround for https://github.com/llvm/llvm-project/issues/52765
+SRC_URI:append:libc-glibc:toolchain-clang = " file://0001-test-Disable-optimization-with-clang-for-aligned_all.patch "
+
SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"
S = "${WORKDIR}/git"