diff options
author | 2024-05-17 08:57:18 +0000 | |
---|---|---|
committer | 2024-05-20 09:10:51 +0100 | |
commit | 79560e44184ed0241f7199722cf8c1dd3207b256 (patch) | |
tree | fcc806750ffe3e310bb25039b779bd1665980692 | |
parent | sys-libs/libcap: add 2.70 (diff) | |
download | gentoo-79560e44184ed0241f7199722cf8c1dd3207b256.tar.gz gentoo-79560e44184ed0241f7199722cf8c1dd3207b256.tar.bz2 gentoo-79560e44184ed0241f7199722cf8c1dd3207b256.zip |
dev-libs/mimalloc: conditionally add -latomic
Some systems do not have libatomic, so forcing its use causes build
errors.
Bug: https://bugs.gentoo.org/931778
Signed-off-by: Matthew Smith <matthew@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36716
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dev-libs/mimalloc/mimalloc-2.1.4.ebuild | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/dev-libs/mimalloc/mimalloc-2.1.4.ebuild b/dev-libs/mimalloc/mimalloc-2.1.4.ebuild index bd26f566a18c..a09a864cbf24 100644 --- a/dev-libs/mimalloc/mimalloc-2.1.4.ebuild +++ b/dev-libs/mimalloc/mimalloc-2.1.4.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit cmake-multilib +inherit cmake-multilib flag-o-matic DESCRIPTION="A compact general purpose allocator with excellent performance" HOMEPAGE="https://github.com/microsoft/mimalloc" @@ -25,13 +25,12 @@ src_configure() { -DMI_BUILD_OBJECT=OFF -DMI_BUILD_STATIC=OFF -DMI_TRACK_VALGRIND=$(usex valgrind) - - # Bug #923177 - # find_library(... atomic) appears to not work. Fall back to -latomic - -DMI_USE_LIBATOMIC=ON - -DMI_LIBC_MUSL=$(usex elibc_musl) ) + # Bug #923177, #931778: append -latomic if it is available + test-flags-CCLD "-latomic" &>/dev/null && + mycmakeargs+=( -DMI_USE_LIBATOMIC=ON ) + cmake-multilib_src_configure } |