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/llvm/files/
Date: Mon, 22 Aug 2016 15:12:07
Message-Id: 1471878711.4003fba8c5a0f245b3f471691fe500de17fe2d1a.mgorny@gentoo
1 commit: 4003fba8c5a0f245b3f471691fe500de17fe2d1a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 22 14:24:08 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 22 15:11:51 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4003fba8
7
8 sys-devel/llvm: Remove unused patch
9
10 sys-devel/llvm/files/llvm-3.7-llvm-config.patch | 113 ------------------------
11 1 file changed, 113 deletions(-)
12
13 diff --git a/sys-devel/llvm/files/llvm-3.7-llvm-config.patch b/sys-devel/llvm/files/llvm-3.7-llvm-config.patch
14 deleted file mode 100644
15 index 932c92b..0000000
16 --- a/sys-devel/llvm/files/llvm-3.7-llvm-config.patch
17 +++ /dev/null
18 @@ -1,113 +0,0 @@
19 -From 8a51e9673859eb3fb819f0d1dad5e2a60d1a3c0a Mon Sep 17 00:00:00 2001
20 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
21 -Date: Wed, 2 Dec 2015 16:04:56 +0100
22 -Subject: [PATCH] llvm-config: Clean up exported values, update for shared
23 - linking
24 -
25 -Gentoo-specific fixup for llvm-config, including:
26 -- wiping build-specific CFLAGS, CXXFLAGS,
27 -- updating library suffixes for shared libs,
28 -- wiping --system-libs for shared linking,
29 -- banning --obj-root and --src-root due to no sources installed.
30 -
31 -Thanks to Steven Newbury for the initial patch.
32 -
33 -Bug: https://bugs.gentoo.org/565358
34 -Bug: https://bugs.gentoo.org/501684
35 ----
36 - tools/llvm-config/CMakeLists.txt | 11 ++++++++---
37 - tools/llvm-config/llvm-config.cpp | 22 ++++++++++++++++------
38 - utils/llvm-build/llvmbuild/main.py | 4 +++-
39 - 4 files changed, 27 insertions(+), 10 deletions(-)
40 -
41 -diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
42 -index edbd8c9..9a801bd 100644
43 ---- a/tools/llvm-config/CMakeLists.txt
44 -+++ b/tools/llvm-config/CMakeLists.txt
45 -@@ -22,12 +22,17 @@ get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
46 - set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
47 - set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
48 - set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
49 --set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
50 --set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
51 -+# Just use CMAKE_CPP_FLAGS for CFLAGS and CXXFLAGS, otherwise compiler
52 -+# specific flags will be set when we don't know what compiler will be used
53 -+# with external project utilising llvm-config. C++ Standard is required.
54 -+# TODO: figure out if we can remove -std=c++11 and move it to revdeps.
55 -+set(LLVM_CFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
56 -+set(LLVM_CXXFLAGS "${CMAKE_CPP_FLAGS} -std=c++11 ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
57 - # Use the C++ link flags, since they should be a superset of C link flags.
58 - set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
59 - set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
60 --set(LLVM_SYSTEM_LIBS ${SYSTEM_LIBS})
61 -+# We don't do static libs, so we don't need to supply any system-libs
62 -+set(LLVM_SYSTEM_LIBS "")
63 - string(REPLACE ";" " " LLVM_TARGETS_BUILT "${LLVM_TARGETS_TO_BUILD}")
64 - configure_file(${BUILDVARIABLES_SRCPATH} ${BUILDVARIABLES_OBJPATH} @ONLY)
65 -
66 -diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
67 -index 879b9ab..d2c43fa 100644
68 ---- a/tools/llvm-config/llvm-config.cpp
69 -+++ b/tools/llvm-config/llvm-config.cpp
70 -@@ -323,10 +323,19 @@ int main(int argc, char **argv) {
71 - #else
72 - OS << "ON\n";
73 - #endif
74 -- } else if (Arg == "--obj-root") {
75 -- OS << ActivePrefix << '\n';
76 -- } else if (Arg == "--src-root") {
77 -- OS << LLVM_SRC_ROOT << '\n';
78 -+ } else if (Arg == "--obj-root" || Arg == "--src-root") {
79 -+ if (IsInDevelopmentTree) {
80 -+ if (Arg == "--obj-root") {
81 -+ OS << ActivePrefix << '\n';
82 -+ } else {
83 -+ OS << LLVM_SRC_ROOT << '\n';
84 -+ }
85 -+ } else {
86 -+ // sources are not installed
87 -+ llvm::errs() << "llvm-config: sources not installed, "
88 -+ << Arg << " not available\n";
89 -+ exit(1);
90 -+ }
91 - } else {
92 - usage();
93 - }
94 -@@ -360,8 +369,9 @@ int main(int argc, char **argv) {
95 - OS << ActiveLibDir << '/' << Lib;
96 - } else if (PrintLibs) {
97 - // If this is a typical library name, include it using -l.
98 -- if (Lib.startswith("lib") && Lib.endswith(".a")) {
99 -- OS << "-l" << Lib.slice(3, Lib.size()-2);
100 -+ if (Lib.startswith("lib") && Lib.endswith(LTDL_SHLIB_EXT)) {
101 -+ // sizeof counts trailing NUL
102 -+ OS << "-l" << Lib.slice(3, Lib.size()-sizeof(LTDL_SHLIB_EXT)+1);
103 - continue;
104 - }
105 -
106 -diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
107 -index 353741f..4ba5e91 100644
108 ---- a/utils/llvm-build/llvmbuild/main.py
109 -+++ b/utils/llvm-build/llvmbuild/main.py
110 -@@ -393,6 +393,8 @@ subdirectories = %s
111 - //
112 - //===----------------------------------------------------------------------===//
113 -
114 -+#include "llvm/Config/config.h"
115 -+
116 - """)
117 - f.write('struct AvailableComponent {\n')
118 - f.write(' /// The name of the component.\n')
119 -@@ -413,7 +415,7 @@ subdirectories = %s
120 - if library_name is None:
121 - library_name_as_cstr = '0'
122 - else:
123 -- library_name_as_cstr = '"lib%s.a"' % library_name
124 -+ library_name_as_cstr = '"lib%s" LTDL_SHLIB_EXT' % library_name
125 - f.write(' { "%s", %s, %d, { %s } },\n' % (
126 - name, library_name_as_cstr, is_installed,
127 - ', '.join('"%s"' % dep
128 -
129 ---
130 -2.6.3
131 -