1 |
commit: f091b5dce7c300551e1e7909a367a388f3df665d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 29 05:58:07 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 29 06:06:24 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f091b5dc |
7 |
|
8 |
sys-devel/clang: arch-type patch merged upstream |
9 |
|
10 |
sys-devel/clang/clang-9999.ebuild | 3 - |
11 |
...arch-type-to-find-compiler-rt-libraries-o.patch | 140 --------------------- |
12 |
2 files changed, 143 deletions(-) |
13 |
|
14 |
diff --git a/sys-devel/clang/clang-9999.ebuild b/sys-devel/clang/clang-9999.ebuild |
15 |
index 7b793aff3cd..e179107e2c2 100644 |
16 |
--- a/sys-devel/clang/clang-9999.ebuild |
17 |
+++ b/sys-devel/clang/clang-9999.ebuild |
18 |
@@ -103,9 +103,6 @@ src_unpack() { |
19 |
} |
20 |
|
21 |
src_prepare() { |
22 |
- # fix finding compiler-rt libs |
23 |
- eapply "${FILESDIR}"/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch |
24 |
- |
25 |
# fix stand-alone doc build |
26 |
eapply "${FILESDIR}"/9999/0007-cmake-Support-stand-alone-Sphinx-doxygen-doc-build.patch |
27 |
|
28 |
|
29 |
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 |
30 |
deleted file mode 100644 |
31 |
index 6a0278969c0..00000000000 |
32 |
--- a/sys-devel/clang/files/9999/0001-Driver-Use-arch-type-to-find-compiler-rt-libraries-o.patch |
33 |
+++ /dev/null |
34 |
@@ -1,140 +0,0 @@ |
35 |
-From 3ebf8771792a40ff7701f1309914d5d3d930ea71 Mon Sep 17 00:00:00 2001 |
36 |
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
37 |
-Date: Thu, 17 Nov 2016 14:19:18 +0100 |
38 |
-Subject: [PATCH] [Driver] Use arch type to find compiler-rt libraries (on |
39 |
- Linux) |
40 |
- |
41 |
-Use llvm::Triple::getArchTypeName() when looking for compiler-rt |
42 |
-libraries, rather than the exact arch string from the triple. This is |
43 |
-more correct as it matches the values used when building compiler-rt |
44 |
-(builtin-config-ix.cmake) which are the subset of the values allowed |
45 |
-in triples. |
46 |
- |
47 |
-For example, this fixes an issue when the compiler set for |
48 |
-i686-pc-linux-gnu triple would not find an i386 compiler-rt library, |
49 |
-while this is the exact arch that is detected by compiler-rt. The same |
50 |
-applies to any other i?86 variant allowed by LLVM. |
51 |
- |
52 |
-This also makes the special case for MSVC unnecessary, since now i386 |
53 |
-will be used reliably for all 32-bit x86 variants. |
54 |
---- |
55 |
- lib/Driver/ToolChain.cpp | 5 +---- |
56 |
- .../usr/i686-unknown-linux/lib/.keep | 0 |
57 |
- .../usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o | 0 |
58 |
- test/Driver/linux-ld.c | 21 +++++++++++++++++++++ |
59 |
- test/Driver/nostdlib.c | 2 +- |
60 |
- test/Driver/print-libgcc-file-name-clangrt.c | 10 ++++++++-- |
61 |
- test/Driver/windows-cross.c | 2 +- |
62 |
- 7 files changed, 32 insertions(+), 8 deletions(-) |
63 |
- create mode 100644 test/Driver/Inputs/basic_linux_tree/usr/i686-unknown-linux/lib/.keep |
64 |
- create mode 100644 test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o |
65 |
- |
66 |
-diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp |
67 |
-index 0476d156f5..2660c5a2c0 100644 |
68 |
---- a/lib/Driver/ToolChain.cpp |
69 |
-+++ b/lib/Driver/ToolChain.cpp |
70 |
-@@ -297,15 +297,12 @@ static StringRef getArchNameForCompilerRTLib(const ToolChain &TC, |
71 |
- const llvm::Triple &Triple = TC.getTriple(); |
72 |
- bool IsWindows = Triple.isOSWindows(); |
73 |
- |
74 |
-- if (Triple.isWindowsMSVCEnvironment() && TC.getArch() == llvm::Triple::x86) |
75 |
-- return "i386"; |
76 |
-- |
77 |
- if (TC.getArch() == llvm::Triple::arm || TC.getArch() == llvm::Triple::armeb) |
78 |
- return (arm::getARMFloatABI(TC, Args) == arm::FloatABI::Hard && !IsWindows) |
79 |
- ? "armhf" |
80 |
- : "arm"; |
81 |
- |
82 |
-- return TC.getArchName(); |
83 |
-+ return llvm::Triple::getArchTypeName(TC.getArch()); |
84 |
- } |
85 |
- |
86 |
- std::string ToolChain::getCompilerRTPath() const { |
87 |
-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 |
88 |
-new file mode 100644 |
89 |
-index 0000000000..e69de29bb2 |
90 |
-diff --git a/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o b/test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i686-unknown-linux/4.6.0/crtbegin.o |
91 |
-new file mode 100644 |
92 |
-index 0000000000..e69de29bb2 |
93 |
-diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c |
94 |
-index 1c5f1a4556..a47afe3924 100644 |
95 |
---- a/test/Driver/linux-ld.c |
96 |
-+++ b/test/Driver/linux-ld.c |
97 |
-@@ -71,6 +71,27 @@ |
98 |
- // CHECK-LD-RT: libclang_rt.builtins-x86_64.a" |
99 |
- // |
100 |
- // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
101 |
-+// RUN: --target=i686-unknown-linux \ |
102 |
-+// RUN: --gcc-toolchain="" \ |
103 |
-+// RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
104 |
-+// RUN: --rtlib=compiler-rt \ |
105 |
-+// RUN: | FileCheck --check-prefix=CHECK-LD-RT-I686 %s |
106 |
-+// CHECK-LD-RT-I686-NOT: warning: |
107 |
-+// CHECK-LD-RT-I686: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
108 |
-+// CHECK-LD-RT-I686: "--eh-frame-hdr" |
109 |
-+// CHECK-LD-RT-I686: "-m" "elf_i386" |
110 |
-+// CHECK-LD-RT-I686: "-dynamic-linker" |
111 |
-+// CHECK-LD-RT-I686: "{{.*}}/usr/lib/gcc/i686-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
112 |
-+// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib/gcc/i686-unknown-linux/4.6.0" |
113 |
-+// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib/gcc/i686-unknown-linux/4.6.0/../../../../i686-unknown-linux/lib" |
114 |
-+// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib/gcc/i686-unknown-linux/4.6.0/../../.." |
115 |
-+// CHECK-LD-RT-I686: "-L[[SYSROOT]]/lib" |
116 |
-+// CHECK-LD-RT-I686: "-L[[SYSROOT]]/usr/lib" |
117 |
-+// CHECK-LD-RT-I686: libclang_rt.builtins-i386.a" |
118 |
-+// CHECK-LD-RT-I686: "-lc" |
119 |
-+// CHECK-LD-RT-I686: libclang_rt.builtins-i386.a" |
120 |
-+// |
121 |
-+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
122 |
- // RUN: --target=arm-linux-androideabi \ |
123 |
- // RUN: --gcc-toolchain="" \ |
124 |
- // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
125 |
-diff --git a/test/Driver/nostdlib.c b/test/Driver/nostdlib.c |
126 |
-index a9ef665c57..c9793d968c 100644 |
127 |
---- a/test/Driver/nostdlib.c |
128 |
-+++ b/test/Driver/nostdlib.c |
129 |
-@@ -27,5 +27,5 @@ |
130 |
- // |
131 |
- // CHECK-LINUX-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' |
132 |
- // CHECK-LINUX-NOSTDLIB: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}" |
133 |
--// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.builtins-i686.a" |
134 |
-+// CHECK-LINUX-NOSTDLIB-NOT: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.builtins-i386.a" |
135 |
- // CHECK-MSVC-NOSTDLIB: warning: argument unused during compilation: '--rtlib=compiler-rt' |
136 |
-diff --git a/test/Driver/print-libgcc-file-name-clangrt.c b/test/Driver/print-libgcc-file-name-clangrt.c |
137 |
-index fb4545af30..ce941dc4a1 100644 |
138 |
---- a/test/Driver/print-libgcc-file-name-clangrt.c |
139 |
-+++ b/test/Driver/print-libgcc-file-name-clangrt.c |
140 |
-@@ -5,10 +5,16 @@ |
141 |
- // RUN: | FileCheck --check-prefix=CHECK-CLANGRT-X8664 %s |
142 |
- // CHECK-CLANGRT-X8664: libclang_rt.builtins-x86_64.a |
143 |
- |
144 |
-+// RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \ |
145 |
-+// RUN: --target=i386-pc-linux \ |
146 |
-+// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s |
147 |
-+// CHECK-CLANGRT-I386: libclang_rt.builtins-i386.a |
148 |
-+ |
149 |
-+// Check whether alternate arch values map to the correct library. |
150 |
-+// |
151 |
- // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \ |
152 |
- // RUN: --target=i686-pc-linux \ |
153 |
--// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I686 %s |
154 |
--// CHECK-CLANGRT-I686: libclang_rt.builtins-i686.a |
155 |
-+// RUN: | FileCheck --check-prefix=CHECK-CLANGRT-I386 %s |
156 |
- |
157 |
- // RUN: %clang -rtlib=compiler-rt -print-libgcc-file-name 2>&1 \ |
158 |
- // RUN: --target=arm-linux-gnueabi \ |
159 |
-diff --git a/test/Driver/windows-cross.c b/test/Driver/windows-cross.c |
160 |
-index 0e688f0a26..072d37cd51 100644 |
161 |
---- a/test/Driver/windows-cross.c |
162 |
-+++ b/test/Driver/windows-cross.c |
163 |
-@@ -64,7 +64,7 @@ |
164 |
- // RUN: | FileCheck %s --check-prefix CHECK-SANITIZE-ADDRESS-EXE-X86 |
165 |
- |
166 |
- // CHECK-SANITIZE-ADDRESS-EXE-X86: "-fsanitize=address" |
167 |
--// CHECK-SANITIZE-ADDRESS-EXE-X86: "{{.*}}clang_rt.asan_dynamic-i686.lib" "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i686.lib" "--undefined" "___asan_seh_interceptor" |
168 |
-+// CHECK-SANITIZE-ADDRESS-EXE-X86: "{{.*}}clang_rt.asan_dynamic-i386.lib" "{{.*}}clang_rt.asan_dynamic_runtime_thunk-i386.lib" "--undefined" "___asan_seh_interceptor" |
169 |
- |
170 |
- // 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 \ |
171 |
- // RUN: | FileCheck %s --check-prefix CHECK-SANITIZE-TSAN |
172 |
--- |
173 |
-2.14.1 |
174 |
- |