summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-20 12:31:04 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-20 18:32:23 +0200
commita8e8f99b99c8758d96ce62faf6df20e334a50d49 (patch)
treef323533d222de220def350c44b7decce8f47e9e2
parentsys-devel/llvm-common: Apply patches in WORKDIR in 10.0.1+ (diff)
downloadgentoo-a8e8f99b99c8758d96ce62faf6df20e334a50d49.tar.gz
gentoo-a8e8f99b99c8758d96ce62faf6df20e334a50d49.tar.bz2
gentoo-a8e8f99b99c8758d96ce62faf6df20e334a50d49.zip
sys-devel/llvm: Apply patches in WORKDIR in 10.0.1+
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch8
-rw-r--r--sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch8
-rw-r--r--sys-devel/llvm/llvm-10.0.1.9999.ebuild14
-rw-r--r--sys-devel/llvm/llvm-10.0.1_rc1.ebuild14
-rw-r--r--sys-devel/llvm/llvm-11.0.0.9999.ebuild8
5 files changed, 31 insertions, 21 deletions
diff --git a/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch b/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
index 2c2222a21bcf..445cb6de2c32 100644
--- a/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
+++ b/sys-devel/llvm/files/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
@@ -10,13 +10,13 @@ due to duplicate symbols and apparently fixes mingw32.
This is an alternative approach to D44650 that just forces .a libraries
instead. However, there doesn't seem to be any reason to do that.
---
- tools/llvm-cfi-verify/lib/CMakeLists.txt | 20 +++++++++++--------
+ llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt | 20 +++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
-diff --git a/tools/llvm-cfi-verify/lib/CMakeLists.txt b/tools/llvm-cfi-verify/lib/CMakeLists.txt
+diff --git a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
index 82ca42e624a..41d55ed9321 100644
---- a/tools/llvm-cfi-verify/lib/CMakeLists.txt
-+++ b/tools/llvm-cfi-verify/lib/CMakeLists.txt
+--- a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
++++ b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt
@@ -7,13 +7,17 @@ add_library(LLVMCFIVerify
)
diff --git a/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch b/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
index 3dcfad0a5138..24786905c4d9 100644
--- a/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
+++ b/sys-devel/llvm/files/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
@@ -9,13 +9,13 @@ to link to the dylib only here but the target sub-libraries use hidden
symbols from LLVM target libraries and therefore linking the dylib
fails.
---
- tools/llvm-exegesis/CMakeLists.txt | 1 +
+ llvm/tools/llvm-exegesis/CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
-diff --git a/tools/llvm-exegesis/CMakeLists.txt b/tools/llvm-exegesis/CMakeLists.txt
+diff --git a/llvm/tools/llvm-exegesis/CMakeLists.txt b/llvm/tools/llvm-exegesis/CMakeLists.txt
index a59e1b74024..0575f2a06bb 100644
---- a/tools/llvm-exegesis/CMakeLists.txt
-+++ b/tools/llvm-exegesis/CMakeLists.txt
+--- a/llvm/tools/llvm-exegesis/CMakeLists.txt
++++ b/llvm/tools/llvm-exegesis/CMakeLists.txt
@@ -5,6 +5,7 @@ set(LLVM_LINK_COMPONENTS
)
diff --git a/sys-devel/llvm/llvm-10.0.1.9999.ebuild b/sys-devel/llvm/llvm-10.0.1.9999.ebuild
index 155919578250..2925a2bdb65c 100644
--- a/sys-devel/llvm/llvm-10.0.1.9999.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1.9999.ebuild
@@ -73,6 +73,12 @@ PDEPEND="sys-devel/llvm-common
# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo
+PATCHES=(
+ # Fix linking to dylib and .a libs simultaneously
+ "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
+ "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
+)
+
python_check_deps() {
if use doc; then
has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
@@ -178,10 +184,6 @@ src_prepare() {
# https://bugs.gentoo.org/show_bug.cgi?id=565358
eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
- # Fix linking to dylib and .a libs simultaneously
- eapply "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
- eapply "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
-
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
@@ -193,7 +195,9 @@ src_prepare() {
sed -i -e '/source_parsers/d' docs/conf.py || die
fi
- # User patches + QA
+ # cmake eclasses suck by forcing ${S} here
+ CMAKE_USE_DIR=${S} \
+ S=${WORKDIR} \
cmake-utils_src_prepare
# Verify that the live ebuild is up-to-date
diff --git a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild b/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
index d60b458d6a09..3895554f8d57 100644
--- a/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1_rc1.ebuild
@@ -73,6 +73,12 @@ PDEPEND="sys-devel/llvm-common
# least intrusive of all
CMAKE_BUILD_TYPE=RelWithDebInfo
+PATCHES=(
+ # Fix linking to dylib and .a libs simultaneously
+ "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
+ "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
+)
+
python_check_deps() {
if use doc; then
has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
@@ -146,10 +152,6 @@ src_prepare() {
# https://bugs.gentoo.org/show_bug.cgi?id=565358
eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
- # Fix linking to dylib and .a libs simultaneously
- eapply "${FILESDIR}"/10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch
- eapply "${FILESDIR}"/10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch
-
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
@@ -161,7 +163,9 @@ src_prepare() {
sed -i -e '/source_parsers/d' docs/conf.py || die
fi
- # User patches + QA
+ # cmake eclasses suck by forcing ${S} here
+ CMAKE_USE_DIR=${S} \
+ S=${WORKDIR} \
cmake-utils_src_prepare
}
diff --git a/sys-devel/llvm/llvm-11.0.0.9999.ebuild b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
index bcf802e88472..b9699a63af7f 100644
--- a/sys-devel/llvm/llvm-11.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
@@ -189,11 +189,13 @@ src_prepare() {
sed -i -e '/source_parsers/d' docs/conf.py || die
fi
- # User patches + QA
- cmake-utils_src_prepare
-
# Verify that the live ebuild is up-to-date
check_live_ebuild
+
+ # cmake eclasses suck by forcing ${S} here
+ CMAKE_USE_DIR=${S} \
+ S=${WORKDIR} \
+ cmake-utils_src_prepare
}
# Is LLVM being linked against libc++?