- Add compiler_rt-r196612.patch to fix ubsan failures on i586

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=316
This commit is contained in:
Ismail Dönmez 2013-12-09 11:44:30 +00:00 committed by Git OBS Bridge
parent 54c989d240
commit 6b56e8e731
3 changed files with 54 additions and 0 deletions

38
compiler_rt-r196612.patch Normal file
View File

@ -0,0 +1,38 @@
Index: lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp
===================================================================
--- lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp (revision 196611)
+++ lib/ubsan/lit_tests/TestCases/Integer/uadd-overflow.cpp (revision 196612)
@@ -18,7 +18,7 @@
#ifdef ADD_I64
(void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull));
- // CHECK-ADD_I64: 10000000000000000000 + 9000000000000000000 cannot be represented in type 'unsigned long'
+ // CHECK-ADD_I64: 10000000000000000000 + 9000000000000000000 cannot be represented in type 'unsigned {{long( long)?}}'
#endif
#ifdef ADD_I128
Index: lib/ubsan/lit_tests/TestCases/Integer/no-recover.cpp
===================================================================
--- lib/ubsan/lit_tests/TestCases/Integer/no-recover.cpp (revision 196611)
+++ lib/ubsan/lit_tests/TestCases/Integer/no-recover.cpp (revision 196612)
@@ -17,6 +17,6 @@
// ABORT: no-recover.cpp:[[@LINE-2]]:5: runtime error: unsigned integer overflow: 2271560481 + 3989547399 cannot be represented in type 'unsigned int'
(void)(uint64_t(10000000000000000000ull) + uint64_t(9000000000000000000ull));
- // RECOVER: 10000000000000000000 + 9000000000000000000 cannot be represented in type 'unsigned long'
+ // RECOVER: 10000000000000000000 + 9000000000000000000 cannot be represented in type 'unsigned {{long( long)?}}'
// ABORT-NOT: runtime error
}
Index: lib/ubsan/lit_tests/TestCases/Integer/usub-overflow.cpp
===================================================================
--- lib/ubsan/lit_tests/TestCases/Integer/usub-overflow.cpp (revision 196611)
+++ lib/ubsan/lit_tests/TestCases/Integer/usub-overflow.cpp (revision 196612)
@@ -17,7 +17,7 @@
#ifdef SUB_I64
(void)(uint64_t(8000000000000000000ll) - uint64_t(9000000000000000000ll));
- // CHECK-SUB_I64: 8000000000000000000 - 9000000000000000000 cannot be represented in type 'unsigned long'
+ // CHECK-SUB_I64: 8000000000000000000 - 9000000000000000000 cannot be represented in type 'unsigned {{long( long)?}}'
#endif
#ifdef SUB_I128

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Dec 9 11:42:44 UTC 2013 - idonmez@suse.com
- Add compiler_rt-r196612.patch to fix ubsan failures on i586
-------------------------------------------------------------------
Mon Dec 9 08:54:48 UTC 2013 - idonmez@suse.com

View File

@ -45,6 +45,7 @@ Patch8: aarch64-suse-support.patch
Patch9: arm-remove-xfails.diff
# PATCH-FIX-OPENSUSE asan-disable-hugemalloctest.patch -- Disable ASAN HugeMallocTest
Patch10: asan-disable-hugemalloctest.patch
Patch11: compiler_rt-r196612.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -167,6 +168,9 @@ This package contains the Python bindings to clang (C language) frontend for LLV
%patch8 -p1
%patch9
%patch10 -p1
pushd projects/compiler-rt
%patch11
popd
# We hardcode i586
rm tools/clang/test/Driver/x86_features.c
@ -295,6 +299,13 @@ cmake -G "Unix Makefiles" \
make %{?_smp_mflags} VERBOSE=1
%check
%if %{ix86}
# These tests are 64bit only
for i in basic custom flags fncall propagate; do
rm projects/compiler-rt/lib/dfsan/lit_tests/$i.c;
done
%endif
cd stage2
%ifnarch armv7hl armv7l
%if 0%{!?qemu_user_space_build:1}