summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-12-14 18:34:20 +0100
committerMichał Górny <mgorny@gentoo.org>2018-12-14 18:35:44 +0100
commit78485cd14bd02fa17405bb27357fc27f63e795c8 (patch)
tree046105c6a199acab7889b401b7ffbdf464148be2 /sys-devel/llvm
parentprofiles/base: Unmask sys-devel/clang[z3] (diff)
downloadgentoo-78485cd14bd02fa17405bb27357fc27f63e795c8.tar.gz
gentoo-78485cd14bd02fa17405bb27357fc27f63e795c8.tar.bz2
gentoo-78485cd14bd02fa17405bb27357fc27f63e795c8.zip
sys-devel/llvm: Update llvm-config patch
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/files/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch54
-rw-r--r--sys-devel/llvm/files/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch20
-rw-r--r--sys-devel/llvm/llvm-4.0.1-r1.ebuild2
-rw-r--r--sys-devel/llvm/llvm-5.0.2.ebuild2
-rw-r--r--sys-devel/llvm/llvm-6.0.1-r1.ebuild2
-rw-r--r--sys-devel/llvm/llvm-6.0.1-r2.ebuild2
-rw-r--r--sys-devel/llvm/llvm-6.0.1.ebuild2
-rw-r--r--sys-devel/llvm/llvm-7.0.0-r1.ebuild2
-rw-r--r--sys-devel/llvm/llvm-7.0.0.ebuild2
-rw-r--r--sys-devel/llvm/llvm-7.0.1_rc2.ebuild2
-rw-r--r--sys-devel/llvm/llvm-7.0.9999.ebuild2
11 files changed, 63 insertions, 29 deletions
diff --git a/sys-devel/llvm/files/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch b/sys-devel/llvm/files/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
new file mode 100644
index 00000000000..5def55d38fc
--- /dev/null
+++ b/sys-devel/llvm/files/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
@@ -0,0 +1,54 @@
+From 628b899be14a6bab4b32dbd53aabd447dcc16cb7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 20 Aug 2016 23:47:41 +0200
+Subject: [PATCH] llvm-config: Clean up exported values, update for shared
+ linking
+
+Gentoo-specific fixup for llvm-config, including:
+- wiping build-specific CFLAGS, CXXFLAGS,
+- making --src-root return invalid path (/dev/null).
+
+Thanks to Steven Newbury for the initial patch.
+
+Bug: https://bugs.gentoo.org/565358
+Bug: https://bugs.gentoo.org/501684
+
+diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
+index 744fa4e44d1..593788aaef3 100644
+--- a/tools/llvm-config/CMakeLists.txt
++++ b/tools/llvm-config/CMakeLists.txt
+@@ -32,8 +32,12 @@ get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
+ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
+ set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
+ set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+-set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+-set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
++# Just use CMAKE_CPP_FLAGS for CFLAGS and CXXFLAGS, otherwise compiler
++# specific flags will be set when we don't know what compiler will be used
++# with external project utilising llvm-config. C++ Standard is required.
++# TODO: figure out if we can remove -std=c++11 and move it to revdeps.
++set(LLVM_CFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
++set(LLVM_CXXFLAGS "${CMAKE_CPP_FLAGS} -std=c++11 ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+ set(LLVM_BUILD_SYSTEM cmake)
+ set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
+ set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index d780094861c..c61c72ff48c 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -549,7 +550,11 @@ int main(int argc, char **argv) {
+ } else if (Arg == "--obj-root") {
+ OS << ActivePrefix << '\n';
+ } else if (Arg == "--src-root") {
+- OS << LLVM_SRC_ROOT << '\n';
++ if (IsInDevelopmentTree) {
++ OS << LLVM_SRC_ROOT << '\n';
++ } else {
++ OS << "/dev/null\n";
++ }
+ } else if (Arg == "--ignore-libllvm") {
+ LinkDyLib = false;
+ LinkMode = BuiltSharedLibs ? LinkModeShared : LinkModeAuto;
+--
+2.11.0
+
diff --git a/sys-devel/llvm/files/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch b/sys-devel/llvm/files/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
index 5def55d38fc..cf52314ce75 100644
--- a/sys-devel/llvm/files/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+++ b/sys-devel/llvm/files/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
@@ -5,7 +5,6 @@ Subject: [PATCH] llvm-config: Clean up exported values, update for shared
linking
Gentoo-specific fixup for llvm-config, including:
-- wiping build-specific CFLAGS, CXXFLAGS,
- making --src-root return invalid path (/dev/null).
Thanks to Steven Newbury for the initial patch.
@@ -13,25 +12,6 @@ Thanks to Steven Newbury for the initial patch.
Bug: https://bugs.gentoo.org/565358
Bug: https://bugs.gentoo.org/501684
-diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
-index 744fa4e44d1..593788aaef3 100644
---- a/tools/llvm-config/CMakeLists.txt
-+++ b/tools/llvm-config/CMakeLists.txt
-@@ -32,8 +32,12 @@ get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
- set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
- set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
- set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
--set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
--set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
-+# Just use CMAKE_CPP_FLAGS for CFLAGS and CXXFLAGS, otherwise compiler
-+# specific flags will be set when we don't know what compiler will be used
-+# with external project utilising llvm-config. C++ Standard is required.
-+# TODO: figure out if we can remove -std=c++11 and move it to revdeps.
-+set(LLVM_CFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
-+set(LLVM_CXXFLAGS "${CMAKE_CPP_FLAGS} -std=c++11 ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
- set(LLVM_BUILD_SYSTEM cmake)
- set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
- set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index d780094861c..c61c72ff48c 100644
--- a/tools/llvm-config/llvm-config.cpp
diff --git a/sys-devel/llvm/llvm-4.0.1-r1.ebuild b/sys-devel/llvm/llvm-4.0.1-r1.ebuild
index 1df06e2d848..405b1bf4ea6 100644
--- a/sys-devel/llvm/llvm-4.0.1-r1.ebuild
+++ b/sys-devel/llvm/llvm-4.0.1-r1.ebuild
@@ -73,7 +73,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# Backport the fix for dlclose() causing option parser mess
# e.g. https://bugs.gentoo.org/617154
diff --git a/sys-devel/llvm/llvm-5.0.2.ebuild b/sys-devel/llvm/llvm-5.0.2.ebuild
index a90d48e4c36..29bd7b64407 100644
--- a/sys-devel/llvm/llvm-5.0.2.ebuild
+++ b/sys-devel/llvm/llvm-5.0.2.ebuild
@@ -76,7 +76,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# Apply the backported patches
eapply "${WORKDIR}/llvm-5.0.1-patchset"
diff --git a/sys-devel/llvm/llvm-6.0.1-r1.ebuild b/sys-devel/llvm/llvm-6.0.1-r1.ebuild
index 1d5d5a04df1..3586bb2eac7 100644
--- a/sys-devel/llvm/llvm-6.0.1-r1.ebuild
+++ b/sys-devel/llvm/llvm-6.0.1-r1.ebuild
@@ -78,7 +78,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD).
eapply "${FILESDIR}"/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch
diff --git a/sys-devel/llvm/llvm-6.0.1-r2.ebuild b/sys-devel/llvm/llvm-6.0.1-r2.ebuild
index d2078979150..cd4c7fd72ce 100644
--- a/sys-devel/llvm/llvm-6.0.1-r2.ebuild
+++ b/sys-devel/llvm/llvm-6.0.1-r2.ebuild
@@ -78,7 +78,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD).
eapply "${FILESDIR}"/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch
diff --git a/sys-devel/llvm/llvm-6.0.1.ebuild b/sys-devel/llvm/llvm-6.0.1.ebuild
index a1989293ef7..d4cb259ec03 100644
--- a/sys-devel/llvm/llvm-6.0.1.ebuild
+++ b/sys-devel/llvm/llvm-6.0.1.ebuild
@@ -78,7 +78,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# Fix appending -Wl,-rpath-link on non-Linux (-> FreeBSD).
eapply "${FILESDIR}"/6.0.1/0001-cmake-Append-Wl-rpath-link-conditionally-to-GNULD.patch
diff --git a/sys-devel/llvm/llvm-7.0.0-r1.ebuild b/sys-devel/llvm/llvm-7.0.0-r1.ebuild
index 49fdc4c05a6..2ffa59aa5f5 100644
--- a/sys-devel/llvm/llvm-7.0.0-r1.ebuild
+++ b/sys-devel/llvm/llvm-7.0.0-r1.ebuild
@@ -79,7 +79,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# Fix x86 codegen bug triggered by Chromium
# https://bugs.gentoo.org/664868
diff --git a/sys-devel/llvm/llvm-7.0.0.ebuild b/sys-devel/llvm/llvm-7.0.0.ebuild
index 08b89718f24..fc86b1c7ea9 100644
--- a/sys-devel/llvm/llvm-7.0.0.ebuild
+++ b/sys-devel/llvm/llvm-7.0.0.ebuild
@@ -79,7 +79,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
diff --git a/sys-devel/llvm/llvm-7.0.1_rc2.ebuild b/sys-devel/llvm/llvm-7.0.1_rc2.ebuild
index ac571ed3622..11d14de612f 100644
--- a/sys-devel/llvm/llvm-7.0.1_rc2.ebuild
+++ b/sys-devel/llvm/llvm-7.0.1_rc2.ebuild
@@ -79,7 +79,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
diff --git a/sys-devel/llvm/llvm-7.0.9999.ebuild b/sys-devel/llvm/llvm-7.0.9999.ebuild
index b72dc4253f2..9e2be474c59 100644
--- a/sys-devel/llvm/llvm-7.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-7.0.9999.ebuild
@@ -79,7 +79,7 @@ CMAKE_BUILD_TYPE=RelWithDebInfo
src_prepare() {
# Fix llvm-config for shared linking and sane flags
# https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
+ eapply "${FILESDIR}"/7.0.9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die