diff options
author | 2019-01-03 19:36:29 +0100 | |
---|---|---|
committer | 2019-01-03 19:37:12 +0100 | |
commit | 1393d91fc66fd5afad091e408fbadf5bab514678 (patch) | |
tree | caab60edd4cf4176aac48794c51cf3bfcae971f5 /sys-devel | |
parent | dev-libs/libarcus: fix Manifest (diff) | |
download | gentoo-1393d91fc66fd5afad091e408fbadf5bab514678.tar.gz gentoo-1393d91fc66fd5afad091e408fbadf5bab514678.tar.bz2 gentoo-1393d91fc66fd5afad091e408fbadf5bab514678.zip |
sys-devel/clang: Backport atomic detection fix
Closes: https://bugs.gentoo.org/667016
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/clang/clang-7.0.1.ebuild | 4 | ||||
-rw-r--r-- | sys-devel/clang/files/7.0.1/0001-clangd-Fix-detecting-atomics-in-stand-alone-builds.patch | 38 |
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-devel/clang/clang-7.0.1.ebuild b/sys-devel/clang/clang-7.0.1.ebuild index 628a17f3f484..e48ada0998b5 100644 --- a/sys-devel/clang/clang-7.0.1.ebuild +++ b/sys-devel/clang/clang-7.0.1.ebuild @@ -71,6 +71,10 @@ CMAKE_BUILD_TYPE=RelWithDebInfo PATCHES=( # add Prefix include paths for Darwin "${FILESDIR}"/6.0.1/darwin_prefix-include-paths.patch + + # fix detecting atomics library in clangd + # https://bugs.gentoo.org/667016 + "${FILESDIR}"/7.0.1/0001-clangd-Fix-detecting-atomics-in-stand-alone-builds.patch ) # Multilib notes: diff --git a/sys-devel/clang/files/7.0.1/0001-clangd-Fix-detecting-atomics-in-stand-alone-builds.patch b/sys-devel/clang/files/7.0.1/0001-clangd-Fix-detecting-atomics-in-stand-alone-builds.patch new file mode 100644 index 000000000000..151c2b5e8e8a --- /dev/null +++ b/sys-devel/clang/files/7.0.1/0001-clangd-Fix-detecting-atomics-in-stand-alone-builds.patch @@ -0,0 +1,38 @@ +From 74aa5bb20b3d8e1ed2b590053fdd665e9dde8462 Mon Sep 17 00:00:00 2001 +From: Michal Gorny <mgorny@gentoo.org> +Date: Thu, 3 Jan 2019 16:43:27 +0000 +Subject: [PATCH] [clangd] Fix detecting atomics in stand-alone builds + +Include CheckAtomic CMake module from LLVM in order to detect support +for atomics when building stand-alone. Otherwise, +the HAVE_CXX_ATOMICS64_WITHOUT_LIB variable is undefined and clangd +wrongly attempts to link -latomic on systems not using the library. + +Original bug report: https://bugs.gentoo.org/667016 + +Differential Revision: https://reviews.llvm.org/D56061 + +git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@350329 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + clangd/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/clangd/CMakeLists.txt b/clangd/CMakeLists.txt +index 39467bd5..251ee7fc 100644 +--- a/tools/extra/clangd/CMakeLists.txt ++++ b/tools/extra/clangd/CMakeLists.txt +@@ -2,6 +2,11 @@ set(LLVM_LINK_COMPONENTS + Support + ) + ++if(CLANG_BUILT_STANDALONE) ++ # needed to get HAVE_CXX_ATOMICS64_WITHOUT_LIB defined ++ include(CheckAtomic) ++endif() ++ + set(CLANGD_ATOMIC_LIB "") + if(NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB) + list(APPEND CLANGD_ATOMIC_LIB "atomic") +-- +2.20.1 + |