summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-03-20 21:20:12 +0100
committerMichał Górny <mgorny@gentoo.org>2018-03-20 23:13:14 +0100
commitfd5ea318c3f1b5f59c8b783202a3b22321c2e25f (patch)
tree6f32e0e0d6e25b1e42db97ee8fb3e4c5328a53e0 /sys-devel/clang
parentsys-devel/clang: Backport fix for crash with long cmdline to 6.0.0 (diff)
downloadgentoo-fd5ea318c3f1b5f59c8b783202a3b22321c2e25f.tar.gz
gentoo-fd5ea318c3f1b5f59c8b783202a3b22321c2e25f.tar.bz2
gentoo-fd5ea318c3f1b5f59c8b783202a3b22321c2e25f.zip
sys-devel/clang: Fix test failure w/ USE=compiler-rt in 6.0.0
Closes: https://bugs.gentoo.org/650316
Diffstat (limited to 'sys-devel/clang')
-rw-r--r--sys-devel/clang/clang-6.0.0-r1.ebuild3
-rw-r--r--sys-devel/clang/files/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch30
2 files changed, 33 insertions, 0 deletions
diff --git a/sys-devel/clang/clang-6.0.0-r1.ebuild b/sys-devel/clang/clang-6.0.0-r1.ebuild
index c001fef8e411..a8ab8bbb6b6a 100644
--- a/sys-devel/clang/clang-6.0.0-r1.ebuild
+++ b/sys-devel/clang/clang-6.0.0-r1.ebuild
@@ -74,6 +74,9 @@ PATCHES=(
# fix Driver crash with CHOST prefix and long command-line
# https://bugs.gentoo.org/650082
"${FILESDIR}"/6.0.0/0001-Driver-Avoid-invalidated-iterator-in-insertTargetAnd.patch
+ # fix test failure with default-compiler-rt
+ # https://bugs.gentoo.org/650316
+ "${FILESDIR}"/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch
)
# Multilib notes:
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
new file mode 100644
index 000000000000..0c6644891069
--- /dev/null
+++ b/sys-devel/clang/files/6.0.0/0002-test-Fix-Cross-DSO-CFI-Android-sanitizer-test-for-rt.patch
@@ -0,0 +1,30 @@
+From f81bc3f2d174ac21e576cdddb736524531258fbe Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 19 Mar 2018 20:55:47 +0100
+Subject: [PATCH 2/2] [test] Fix Cross-DSO CFI Android sanitizer test for
+ -rtlib=compiler-rt
+
+Fix the CHECK-CFI-CROSS-DSO-ANDROID test to be more precise and match
+specifically 'clang_rt.cfi' rather than any compiler-rt library. This
+fixes the failure when the linker command-line contains
+clang_rt.builtins library due to CLANG_DEFAULT_RTLIB=compiler-rt.
+---
+ test/Driver/sanitizer-ld.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Driver/sanitizer-ld.c b/test/Driver/sanitizer-ld.c
+index 0da4255f69..9309450186 100644
+--- a/test/Driver/sanitizer-ld.c
++++ b/test/Driver/sanitizer-ld.c
+@@ -514,7 +514,7 @@
+ // RUN: --sysroot=%S/Inputs/basic_android_tree \
+ // RUN: | FileCheck --check-prefix=CHECK-CFI-CROSS-DSO-ANDROID %s
+ // CHECK-CFI-CROSS-DSO-ANDROID: "{{.*}}ld{{(.exe)?}}"
+-// CHECK-CFI-CROSS-DSO-ANDROID-NOT: libclang_rt.
++// CHECK-CFI-CROSS-DSO-ANDROID-NOT: libclang_rt.cfi
+
+ // Cross-DSO CFI with diagnostics on Android links just the UBSAN runtime.
+ // RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso %s -### -o %t.o 2>&1 \
+--
+2.16.2
+