mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-24 22:00:27 +00:00
Merge branch '11' into '11'
Fix the fuzzer build on i386 See merge request pkg-llvm-team/llvm-toolchain!62
This commit is contained in:
commit
0418b47236
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,10 +1,3 @@
|
|||||||
llvm-toolchain-11 (1:11.0.0-5) unstable; urgency=medium
|
|
||||||
|
|
||||||
* qualify-clang.sh: skip a fuzzer test in i386 because of
|
|
||||||
https://bugs.llvm.org/show_bug.cgi?id=43677
|
|
||||||
|
|
||||||
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 02 Nov 2020 12:44:42 +0100
|
|
||||||
|
|
||||||
llvm-toolchain-11 (1:11.0.0-4) unstable; urgency=medium
|
llvm-toolchain-11 (1:11.0.0-4) unstable; urgency=medium
|
||||||
|
|
||||||
* Cherry-pick some fixes from
|
* Cherry-pick some fixes from
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
Index: llvm-toolchain-snapshot_11~++20200418115741+8e0c5f72005/compiler-rt/lib/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-snapshot_11~++20200418115741+8e0c5f72005.orig/compiler-rt/lib/CMakeLists.txt
|
|
||||||
+++ llvm-toolchain-snapshot_11~++20200418115741+8e0c5f72005/compiler-rt/lib/CMakeLists.txt
|
|
||||||
@@ -57,7 +57,10 @@ if(COMPILER_RT_BUILD_XRAY)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(COMPILER_RT_BUILD_LIBFUZZER)
|
|
||||||
- compiler_rt_build_runtime(fuzzer)
|
|
||||||
+ if(NOT(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i386" OR CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686"))
|
|
||||||
+ # Disabled because of https://bugs.llvm.org/show_bug.cgi?id=43677
|
|
||||||
+ compiler_rt_build_runtime(fuzzer)
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# It doesn't normally make sense to build runtimes when a sanitizer is enabled,
|
|
||||||
Index: llvm-toolchain-snapshot_11~++20200418115741+8e0c5f72005/compiler-rt/test/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- llvm-toolchain-snapshot_11~++20200418115741+8e0c5f72005.orig/compiler-rt/test/CMakeLists.txt
|
|
||||||
+++ llvm-toolchain-snapshot_11~++20200418115741+8e0c5f72005/compiler-rt/test/CMakeLists.txt
|
|
||||||
@@ -55,7 +55,10 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
|
|
||||||
|
|
||||||
# OpenBSD not supporting asan, cannot run the tests
|
|
||||||
if(COMPILER_RT_BUILD_LIBFUZZER AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD" AND NOT ANDROID)
|
|
||||||
- compiler_rt_test_runtime(fuzzer)
|
|
||||||
+ if(NOT(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i386" OR CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686"))
|
|
||||||
+ # Disabled because of https://bugs.llvm.org/show_bug.cgi?id=43677
|
|
||||||
+ compiler_rt_test_runtime(fuzzer)
|
|
||||||
+ endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD})
|
|
3
debian/patches/series
vendored
3
debian/patches/series
vendored
@ -133,7 +133,8 @@ workaround-bug-42994-use-linker.diff
|
|||||||
# bug 939472
|
# bug 939472
|
||||||
#try-to-unbreak-thinlto.diff
|
#try-to-unbreak-thinlto.diff
|
||||||
D67877.patch
|
D67877.patch
|
||||||
disable-fuzzer-compiler-rt-x86.diff
|
|
||||||
|
x86-fuzzer.patch
|
||||||
|
|
||||||
python3-shebang.patch
|
python3-shebang.patch
|
||||||
print-lldb-path.patch
|
print-lldb-path.patch
|
||||||
|
14
debian/patches/x86-fuzzer.patch
vendored
Normal file
14
debian/patches/x86-fuzzer.patch
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
Description: fuzzer: EMULATION_ARGUMENT is also required when building on i386 for x86_64
|
||||||
|
Author: Adrian Bunk <bunk@debian.org>
|
||||||
|
|
||||||
|
--- llvm-toolchain-11-11.0.0.orig/compiler-rt/lib/fuzzer/CMakeLists.txt
|
||||||
|
+++ llvm-toolchain-11-11.0.0/compiler-rt/lib/fuzzer/CMakeLists.txt
|
||||||
|
@@ -121,6 +121,8 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND
|
||||||
|
macro(partially_link_libcxx name dir arch)
|
||||||
|
if(${arch} MATCHES "i386")
|
||||||
|
set(EMULATION_ARGUMENT "-m" "elf_i386")
|
||||||
|
+ elseif(${arch} MATCHES "x86_64")
|
||||||
|
+ set(EMULATION_ARGUMENT "-m" "elf_x86_64")
|
||||||
|
else()
|
||||||
|
set(EMULATION_ARGUMENT "")
|
||||||
|
endif()
|
11
debian/qualify-clang.sh
vendored
11
debian/qualify-clang.sh
vendored
@ -592,14 +592,9 @@ if ! ./a.out 2>&1 | grep -q -E "(Test unit written|PreferSmall)"; then
|
|||||||
exit 42
|
exit 42
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# do not fail on i386 because of:
|
clang++-$VERSION -fsanitize=address,fuzzer test_fuzzer.cc
|
||||||
# https://bugs.llvm.org/show_bug.cgi?id=43677
|
if ! ./a.out 2>&1 | grep -q "libFuzzer: deadly signal"; then
|
||||||
# https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/commit/9d4d39eef90f5106080ab7f4394a5a4d743cac05
|
echo "fuzzer failed"
|
||||||
if [ $DEB_HOST_ARCH != "i386" ]; then
|
|
||||||
clang++-$VERSION -fsanitize=address,fuzzer test_fuzzer.cc
|
|
||||||
if ! ./a.out 2>&1 | grep -q "libFuzzer: deadly signal"; then
|
|
||||||
echo "fuzzer failed"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'int main(int argc, char **argv) {
|
echo 'int main(int argc, char **argv) {
|
||||||
|
Loading…
Reference in New Issue
Block a user