commit: 9df648c8e6df688de3c2523dd817927023ba8ff7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 20:00:51 2017 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 20:02:03 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9df648c8
sys-devel/clang: Rebase the patches for 9999, #628902
sys-devel/clang/clang-4.0.1.ebuild | 2 +-
sys-devel/clang/clang-5.0.9999.ebuild | 2 +-
...arch-type-to-find-compiler-rt-libraries-o.patch | 0
...arch-type-to-find-compiler-rt-libraries-o.patch | 28 ++++++++++++----------
4 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/sys-devel/clang/clang-4.0.1.ebuild
b/sys-devel/clang/clang-4.0.1.ebuild
index 91478e80294..e50f7ce0dc2 100644
--- a/sys-devel/clang/clang-4.0.1.ebuild
+++ b/sys-devel/clang/clang-4.0.1.ebuild
@@ -90,7 +90,7 @@ src_unpack() {
src_prepare() {
# fix finding compiler-rt libs
- eapply
"${FILESDIR}"/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
+ eapply
"${FILESDIR}"/5.0.0/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
# fix stand-alone doc build
eapply
"${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
diff --git a/sys-devel/clang/clang-5.0.9999.ebuild
b/sys-devel/clang/clang-5.0.9999.ebuild
index eac03c29693..b619c8b888b 100644
--- a/sys-devel/clang/clang-5.0.9999.ebuild
+++ b/sys-devel/clang/clang-5.0.9999.ebuild
@@ -103,7 +103,7 @@ src_unpack() {
src_prepare() {
# fix finding compiler-rt libs
- eapply
"${FILESDIR}"/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
+ eapply
"${FILESDIR}"/5.0.0/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
# fix stand-alone doc build
eapply
"${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch
diff --git
a/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
b/sys-devel/clang/files/5.0.0/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
similarity index 100%
copy from
sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
copy to
sys-devel/clang/files/5.0.0/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
diff --git
a/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
b/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
index 7d53cbdef3f..6a0278969c0 100644
---
a/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
+++
b/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch
@@ -1,4 +1,4 @@
-From 19e3dc0ce4949cc7f869b4552c6a7f28cd59c3b7 Mon Sep 17 00:00:00 2001
+From 3ebf8771792a40ff7701f1309914d5d3d930ea71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <[email protected]>
Date: Thu, 17 Nov 2016 14:19:18 +0100
Subject: [PATCH] [Driver] Use arch type to find compiler-rt libraries (on
@@ -30,10 +30,10 @@ will be used reliably for all 32-bit x86 variants.
create mode 100644
test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
-index 6adc0386ee..7e4222f087 100644
+index 0476d156f5..2660c5a2c0 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
-@@ -283,15 +283,12 @@ static StringRef getArchNameForCompilerRTLib(const
ToolChain &TC,
+@@ -297,15 +297,12 @@ static StringRef getArchNameForCompilerRTLib(const
ToolChain &TC,
const llvm::Triple &Triple = TC.getTriple();
bool IsWindows = Triple.isOSWindows();
@@ -49,7 +49,7 @@ index 6adc0386ee..7e4222f087 100644
+ return llvm::Triple::getArchTypeName(TC.getArch());
}
- std::string ToolChain::getCompilerRT(const ArgList &Args, StringRef Component,
+ std::string ToolChain::getCompilerRTPath() const {
diff --git
a/test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep
b/test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep
new file mode 100644
index 0000000000..e69de29bb2
@@ -57,7 +57,7 @@ diff --git
a/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
-index e5aa870866..92b199b9d4 100644
+index 1c5f1a4556..a47afe3924 100644
--- a/test/Driver/linux-ld.c
+++ b/test/Driver/linux-ld.c
@@ -71,6 +71,27 @@
@@ -100,29 +100,33 @@ index a9ef665c57..c9793d968c 100644
+// CHECK-LINUX-NOSTDLIB-NOT:
"{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.builtins-i386.a"
// CHECK-MSVC-NOSTDLIB: warning: argument unused during compilation:
'--rtlib=compiler-rt'
diff --git a/test/Driver/print-libgcc-file-name-clangrt.c
b/test/Driver/print-libgcc-file-name-clangrt.c
-index 9f8120c31d..28c758881d 100644
+index fb4545af30..ce941dc4a1 100644
--- a/test/Driver/print-libgcc-file-name-clangrt.c
+++ b/test/Driver/print-libgcc-file-name-clangrt.c
-@@ -6,6 +6,12 @@
+@@ -5,10 +5,16 @@
+ // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-X8664 %s
// CHECK-CLANGRT-X8664: libclang_rt.builtins-x86_64.a
- // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
++// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
+// RUN: --target=i386-pc-linux \
+// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
+// CHECK-CLANGRT-I386: libclang_rt.builtins-i386.a
+
+// Check whether alternate arch values map to the correct library.
+//
-+// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
+ // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
// RUN: --target=i686-pc-linux \
-// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I686 %s
-// CHECK-CLANGRT-I686: libclang_rt.builtins-i686.a
+// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s
+
+ // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \
+ // RUN: --target=arm-linux-gnueabi \
diff --git a/test/Driver/windows-cross.c b/test/Driver/windows-cross.c
-index 5a2fe52b09..78b4981c9d 100644
+index 0e688f0a26..072d37cd51 100644
--- a/test/Driver/windows-cross.c
+++ b/test/Driver/windows-cross.c
-@@ -59,7 +59,7 @@
+@@ -64,7 +64,7 @@
// RUN: | FileCheck %s --check-prefix CHECK-SANITIZE-ADDRESS-EXE-X86
// CHECK-SANITIZE-ADDRESS-EXE-X86: "-fsanitize=address"
@@ -132,5 +136,5 @@ index 5a2fe52b09..78b4981c9d 100644
// RUN: %clang -### -target armv7-windows-itanium --sysroot
%S/Inputs/Windows/ARM/8.1 -B %S/Inputs/Windows/ARM/8.1/usr/bin
-fuse-ld=lld-link2 -shared -o shared.dll -fsanitize=tsan -x c++ %s 2>&1 \
// RUN: | FileCheck %s --check-prefix CHECK-SANITIZE-TSAN
--
-2.11.0
+2.14.1