Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/clang/files/9999/, sys-devel/clang/
Date: Tue, 01 Nov 2016 00:41:31
Message-Id: 1477956559.871a6adcce9514e05f1d5074c337c0684c932c2b.mgorny@gentoo
1 commit: 871a6adcce9514e05f1d5074c337c0684c932c2b
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 31 23:25:55 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 31 23:29:19 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=871a6adc
7
8 sys-devel/clang: Stop overriding incorrect LLVMgold.so location
9
10 Remove the patch allowing override of LLVMgold.so libdir,
11 and the relevant override. The patch has been rejected upstream,
12 and the case of running non-native driver considered not important
13 enough to deserve the added complexity. I will attempt to find another
14 (upstreamable) solution.
15
16 sys-devel/clang/clang-9999.ebuild | 7 ---
17 ...LANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch | 64 ----------------------
18 2 files changed, 71 deletions(-)
19
20 diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild
21 index 6a09eb1..689eaae 100644
22 --- a/sys-devel/clang/clang-9999.ebuild
23 +++ b/sys-devel/clang/clang-9999.ebuild
24 @@ -117,16 +117,11 @@ src_prepare() {
25
26 # support overriding clang runtime install directory
27 eapply "${FILESDIR}"/9999/0005-cmake-Supporting-overriding-runtime-libdir-via-CLANG.patch
28 - # support overriding LLVMgold.so plugin directory
29 - eapply "${FILESDIR}"/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
30 # fix stand-alone doc build
31 eapply "${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
32
33 # User patches
34 eapply_user
35 -
36 - # Native libdir is used to hold LLVMgold.so
37 - NATIVE_LIBDIR=$(get_libdir)
38 }
39
40 multilib_src_configure() {
41 @@ -135,8 +130,6 @@ multilib_src_configure() {
42 -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
43 # install clang runtime straight into /usr/lib
44 -DCLANG_LIBDIR_SUFFIX=""
45 - # specify host's binutils gold plugin path
46 - -DCLANG_GOLD_LIBDIR_SUFFIX="${NATIVE_LIBDIR#lib}"
47
48 -DBUILD_SHARED_LIBS=ON
49 -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
50
51 diff --git a/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch b/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
52 deleted file mode 100644
53 index 18adcca..00000000
54 --- a/sys-devel/clang/files/9999/0006-cmake-Add-CLANG_GOLD_LIBDIR_SUFFIX-to-specify-loc-of.patch
55 +++ /dev/null
56 @@ -1,64 +0,0 @@
57 -From cf60af04f0ac2836f50d5a042acc89ef76e76a66 Mon Sep 17 00:00:00 2001
58 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
59 -Date: Sun, 21 Aug 2016 23:31:28 +0200
60 -Subject: [PATCH 6/7] cmake: Add CLANG_GOLD_LIBDIR_SUFFIX to specify loc of
61 - LLVMgold.so
62 -
63 -Add CLANG_GOLD_LIBDIR_SUFFIX that defaults to ${LLVM_LIBDIR_SUFFIX}
64 -and can be overriden if LLVMgold.so is installed elsewhere. The use case
65 -are multilib systems where binutils is 64-bit and clang is 32-bit,
66 -therefore the gold plugin is installed in 64-bit libdir while clang
67 -is not.
68 -
69 -Bug: https://llvm.org/bugs/show_bug.cgi?id=23793
70 -Patch: https://reviews.llvm.org/D23754
71 ----
72 - CMakeLists.txt | 3 +++
73 - include/clang/Config/config.h.cmake | 3 +++
74 - lib/Driver/Tools.cpp | 2 +-
75 - 3 files changed, 7 insertions(+), 1 deletion(-)
76 -
77 -diff --git a/CMakeLists.txt b/CMakeLists.txt
78 -index 67b85b5..8ed8c10 100644
79 ---- a/CMakeLists.txt
80 -+++ b/CMakeLists.txt
81 -@@ -239,6 +239,9 @@ set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
82 - STRING "Define suffix of library directory name for clang runtime (32/64)")
83 - set(CLANG_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${CLANG_LIBDIR_SUFFIX})
84 -
85 -+set(CLANG_GOLD_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE
86 -+ STRING "Define suffix of library directory name that contains LLVMgold.so (32/64)")
87 -+
88 - set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
89 - set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
90 -
91 -diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
92 -index 9bf9ea5..26e0e7e 100644
93 ---- a/include/clang/Config/config.h.cmake
94 -+++ b/include/clang/Config/config.h.cmake
95 -@@ -20,6 +20,9 @@
96 - /* Multilib suffix for libdir. */
97 - #define CLANG_LIBDIR_SUFFIX "${CLANG_LIBDIR_SUFFIX}"
98 -
99 -+/* Multilib suffix for libdir containing LLVMgold.so. */
100 -+#define CLANG_GOLD_LIBDIR_SUFFIX "${CLANG_GOLD_LIBDIR_SUFFIX}"
101 -+
102 - /* Relative directory for resource files */
103 - #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"
104 -
105 -diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
106 -index a814df3..333a2e9 100644
107 ---- a/lib/Driver/Tools.cpp
108 -+++ b/lib/Driver/Tools.cpp
109 -@@ -2007,7 +2007,7 @@ static void AddGoldPlugin(const ToolChain &ToolChain, const ArgList &Args,
110 - // forward.
111 - CmdArgs.push_back("-plugin");
112 - std::string Plugin =
113 -- ToolChain.getDriver().Dir + "/../lib" CLANG_LIBDIR_SUFFIX "/LLVMgold.so";
114 -+ ToolChain.getDriver().Dir + "/../lib" CLANG_GOLD_LIBDIR_SUFFIX "/LLVMgold.so";
115 - CmdArgs.push_back(Args.MakeArgString(Plugin));
116 -
117 - // Try to pass driver level flags relevant to LTO code generation down to
118 ---
119 -2.9.3
120 -