diff options
| -rw-r--r-- | meta-oe/recipes-devtools/jemalloc/files/0001-test-Disable-optimization-with-clang-for-aligned_all.patch | 33 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb | 3 |
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 @@ | |||
| 1 | From 3fe67deb9fcf0ae3c2ff31a9eccb6a0a9af33b9c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 14 Jan 2022 09:47:03 -0800 | ||
| 4 | Subject: [PATCH] test: Disable optimization with clang for aligned_alloc.c | ||
| 5 | |||
| 6 | Clang crashes when using glibc 2.35, it works ok with older glibc or | ||
| 7 | musl, so its very specific problem. Its reported here | ||
| 8 | |||
| 9 | https://github.com/llvm/llvm-project/issues/52765 | ||
| 10 | |||
| 11 | Until it is fixed, workaround the build failure | ||
| 12 | |||
| 13 | Upstream-Status: Inappropriate [Workaround] | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | test/integration/aligned_alloc.c | 2 ++ | ||
| 17 | 1 file changed, 2 insertions(+) | ||
| 18 | |||
| 19 | diff --git a/test/integration/aligned_alloc.c b/test/integration/aligned_alloc.c | ||
| 20 | index 4375b172..6513bdd9 100644 | ||
| 21 | --- a/test/integration/aligned_alloc.c | ||
| 22 | +++ b/test/integration/aligned_alloc.c | ||
| 23 | @@ -1,5 +1,7 @@ | ||
| 24 | #include "test/jemalloc_test.h" | ||
| 25 | |||
| 26 | +#pragma clang optimize off | ||
| 27 | + | ||
| 28 | #define MAXALIGN (((size_t)1) << 23) | ||
| 29 | |||
| 30 | /* | ||
| 31 | -- | ||
| 32 | 2.34.1 | ||
| 33 | |||
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 \ | |||
| 18 | file://run-ptest \ | 18 | file://run-ptest \ |
| 19 | " | 19 | " |
| 20 | 20 | ||
| 21 | # Workaround for https://github.com/llvm/llvm-project/issues/52765 | ||
| 22 | SRC_URI:append:libc-glibc:toolchain-clang = " file://0001-test-Disable-optimization-with-clang-for-aligned_all.patch " | ||
| 23 | |||
| 21 | SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756" | 24 | SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756" |
| 22 | 25 | ||
| 23 | S = "${WORKDIR}/git" | 26 | S = "${WORKDIR}/git" |
