diff --git a/compiler_rt-r196612.patch b/compiler_rt-r196612.patch new file mode 100644 index 0000000..e5e5065 --- /dev/null +++ b/compiler_rt-r196612.patch @@ -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 diff --git a/llvm.changes b/llvm.changes index 6b227e2..8f1ac99 100644 --- a/llvm.changes +++ b/llvm.changes @@ -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 diff --git a/llvm.spec b/llvm.spec index 5c1fdf3..2180cf3 100644 --- a/llvm.spec +++ b/llvm.spec @@ -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}