1 |
commit: fd5ea318c3f1b5f59c8b783202a3b22321c2e25f |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 20 20:20:12 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 20 22:13:14 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd5ea318 |
7 |
|
8 |
sys-devel/clang: Fix test failure w/ USE=compiler-rt in 6.0.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/650316 |
11 |
|
12 |
sys-devel/clang/clang-6.0.0-r1.ebuild | 3 +++ |
13 |
...oss-DSO-CFI-Android-sanitizer-test-for-rt.patch | 30 ++++++++++++++++++++++ |
14 |
2 files changed, 33 insertions(+) |
15 |
|
16 |
diff --git a/sys-devel/clang/clang-6.0.0-r1.ebuild b/sys-devel/clang/clang-6.0.0-r1.ebuild |
17 |
index c001fef8e41..a8ab8bbb6b6 100644 |
18 |
--- a/sys-devel/clang/clang-6.0.0-r1.ebuild |
19 |
+++ b/sys-devel/clang/clang-6.0.0-r1.ebuild |
20 |
@@ -74,6 +74,9 @@ PATCHES=( |
21 |
# fix Driver crash with CHOST prefix and long command-line |
22 |
# https://bugs.gentoo.org/650082 |
23 |
"${FILESDIR}"/6.0.0/0001-Driver-Avoid-invalidated-iterator-in-insertTargetAnd.patch |
24 |
+ # fix test failure with default-compiler-rt |
25 |
+ # https://bugs.gentoo.org/650316 |
26 |
+ "${FILESDIR}"/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch |
27 |
) |
28 |
|
29 |
# Multilib notes: |
30 |
|
31 |
diff --git a/sys-devel/clang/files/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch b/sys-devel/clang/files/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch |
32 |
new file mode 100644 |
33 |
index 00000000000..0c664489106 |
34 |
--- /dev/null |
35 |
+++ b/sys-devel/clang/files/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch |
36 |
@@ -0,0 +1,30 @@ |
37 |
+From f81bc3f2d174ac21e576cdddb736524531258fbe Mon Sep 17 00:00:00 2001 |
38 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
39 |
+Date: Mon, 19 Mar 2018 20:55:47 +0100 |
40 |
+Subject: [PATCH 2/2] [test] Fix Cross-DSO CFI Android sanitizer test for |
41 |
+ -rtlib=compiler-rt |
42 |
+ |
43 |
+Fix the CHECK-CFI-CROSS-DSO-ANDROID test to be more precise and match |
44 |
+specifically 'clang_rt.cfi' rather than any compiler-rt library. This |
45 |
+fixes the failure when the linker command-line contains |
46 |
+clang_rt.builtins library due to CLANG_DEFAULT_RTLIB=compiler-rt. |
47 |
+--- |
48 |
+ test/Driver/sanitizer-ld.c | 2 +- |
49 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
50 |
+ |
51 |
+diff --git a/test/Driver/sanitizer-ld.c b/test/Driver/sanitizer-ld.c |
52 |
+index 0da4255f69..9309450186 100644 |
53 |
+--- a/test/Driver/sanitizer-ld.c |
54 |
++++ b/test/Driver/sanitizer-ld.c |
55 |
+@@ -514,7 +514,7 @@ |
56 |
+ // RUN: --sysroot=%S/Inputs/basic_android_tree \ |
57 |
+ // RUN: | FileCheck --check-prefix=CHECK-CFI-CROSS-DSO-ANDROID %s |
58 |
+ // CHECK-CFI-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}" |
59 |
+-// CHECK-CFI-CROSS-DSO-ANDROID-NOT: libclang_rt. |
60 |
++// CHECK-CFI-CROSS-DSO-ANDROID-NOT: libclang_rt.cfi |
61 |
+ |
62 |
+ // Cross-DSO CFI with diagnostics on Android links just the UBSAN runtime. |
63 |
+ // RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso %s -### -o %t.o 2>&1 \ |
64 |
+-- |
65 |
+2.16.2 |
66 |
+ |