mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-11-02 13:04:05 +00:00
* Fix the fuzzer build on i386.
* Add two patches backported to fix ppc64el julia build (Closes: #974779)
This commit is contained in:
commit
bd963d07ca
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -2,6 +2,12 @@ llvm-toolchain-9 (1:9.0.1-16) unstable; urgency=medium
|
||||
|
||||
* Only enable libomp-9-doc on supported archs
|
||||
|
||||
[ Adrian Bunk ]
|
||||
* Fix the fuzzer build on i386.
|
||||
|
||||
[ Gianfranco Costamagna ]
|
||||
* Add two patches backported to fix ppc64el julia build (Closes: #974779)
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 01 Mar 2021 10:44:34 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.1-15) unstable; urgency=low
|
||||
|
||||
43
debian/patches/disable-fuzzer-compiler-rt.diff
vendored
43
debian/patches/disable-fuzzer-compiler-rt.diff
vendored
@ -1,43 +0,0 @@
|
||||
Index: llvm-toolchain-9-9.0.0/compiler-rt/lib/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-9-9.0.0.orig/compiler-rt/lib/CMakeLists.txt
|
||||
+++ llvm-toolchain-9-9.0.0/compiler-rt/lib/CMakeLists.txt
|
||||
@@ -57,5 +57,8 @@ if(COMPILER_RT_BUILD_XRAY)
|
||||
endif()
|
||||
|
||||
if(COMPILER_RT_BUILD_LIBFUZZER)
|
||||
- compiler_rt_build_runtime(fuzzer)
|
||||
+ if(NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i386" AND
|
||||
+ NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686")
|
||||
+ compiler_rt_build_runtime(fuzzer)
|
||||
+ endif()
|
||||
endif()
|
||||
Index: llvm-toolchain-9-9.0.0/clang/runtime/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-9-9.0.0.orig/clang/runtime/CMakeLists.txt
|
||||
+++ llvm-toolchain-9-9.0.0/clang/runtime/CMakeLists.txt
|
||||
@@ -130,7 +130,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND E
|
||||
FileCheck count not llvm-nm llvm-objdump llvm-symbolizer)
|
||||
|
||||
# Add top-level targets for various compiler-rt test suites.
|
||||
- set(COMPILER_RT_TEST_SUITES check-fuzzer check-asan check-hwasan check-asan-dynamic check-dfsan
|
||||
+ set(COMPILER_RT_TEST_SUITES check-asan check-hwasan check-asan-dynamic check-dfsan
|
||||
check-lsan check-msan check-sanitizer check-tsan check-ubsan check-ubsan-minimal
|
||||
check-profile check-cfi check-cfi-and-supported check-safestack check-gwp_asan)
|
||||
foreach(test_suite ${COMPILER_RT_TEST_SUITES})
|
||||
Index: llvm-toolchain-9-9.0.0/compiler-rt/test/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-9-9.0.0.orig/compiler-rt/test/CMakeLists.txt
|
||||
+++ llvm-toolchain-9-9.0.0/compiler-rt/test/CMakeLists.txt
|
||||
@@ -57,7 +57,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" AND
|
||||
+ NOT CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i686")
|
||||
+ compiler_rt_test_runtime(fuzzer)
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD})
|
||||
15
debian/patches/llvm-9.0-D78196.patch
vendored
Normal file
15
debian/patches/llvm-9.0-D78196.patch
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp b/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
@@ -198,6 +198,10 @@
|
||||
for (auto *Sym : UpdateOther)
|
||||
if (Sym->isVariable())
|
||||
copyLocalEntry(Sym, Sym->getVariableValue());
|
||||
+
|
||||
+ // Clear the set of symbols that needs to be updated so the streamer can
|
||||
+ // be reused without issues.
|
||||
+ UpdateOther.clear();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
47
debian/patches/llvm9-D71443-PPC-MC-redef-symbol.patch
vendored
Normal file
47
debian/patches/llvm9-D71443-PPC-MC-redef-symbol.patch
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
From 5cd52dbfa9c60cfd12676924bed97701ee9bc4ef Mon Sep 17 00:00:00 2001
|
||||
From: Fangrui Song <maskray@google.com>
|
||||
Date: Thu, 12 Dec 2019 16:18:57 -0800
|
||||
Subject: [PATCH] [MC][PowerPC] Fix a crash when redefining a symbol after .set
|
||||
|
||||
Fix PR44284. This is probably not valid assembly but we should not crash.
|
||||
|
||||
Reviewed By: luporl, #powerpc, steven.zhang
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D71443
|
||||
|
||||
(cherry picked from commit f99eedeb72644671cd584f48e4c136d47f6b0020)
|
||||
---
|
||||
llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp | 3 ++-
|
||||
llvm/test/MC/PowerPC/ppc64-localentry-symbols.s | 5 +++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
index 90c3c8d20ed..71f926c265e 100644
|
||||
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp
|
||||
@@ -196,7 +196,8 @@ public:
|
||||
|
||||
void finish() override {
|
||||
for (auto *Sym : UpdateOther)
|
||||
- copyLocalEntry(Sym, Sym->getVariableValue());
|
||||
+ if (Sym->isVariable())
|
||||
+ copyLocalEntry(Sym, Sym->getVariableValue());
|
||||
}
|
||||
|
||||
private:
|
||||
diff --git llvm/test/MC/PowerPC/ppc64-localentry-symbols.s llvm/test/MC/PowerPC/ppc64-localentry-symbols.s
|
||||
index f1d5c5d0ab1..a663af57ad4 100644
|
||||
--- a/llvm/test/MC/PowerPC/ppc64-localentry-symbols.s
|
||||
+++ b/llvm/test/MC/PowerPC/ppc64-localentry-symbols.s
|
||||
@@ -32,3 +32,8 @@ func:
|
||||
nop
|
||||
nop
|
||||
.localentry func, 8
|
||||
+
|
||||
+## PR44284 Don't crash if err is redefined after .set
|
||||
+.set err, _err
|
||||
+.globl err
|
||||
+err:
|
||||
--
|
||||
2.26.0
|
||||
|
||||
7
debian/patches/series
vendored
7
debian/patches/series
vendored
@ -136,9 +136,10 @@ D74453-riscv-atomic_cmp_xchg.diff
|
||||
#try-to-unbreak-thinlto.diff
|
||||
D67877.patch
|
||||
disable-lit-cpuid-install.diff
|
||||
disable-fuzzer-compiler-rt.diff
|
||||
no-z3.patch
|
||||
|
||||
x86-fuzzer.patch
|
||||
|
||||
# bug #946874
|
||||
D71028-mips-rust-test.diff
|
||||
python3-shebang.patch
|
||||
@ -152,3 +153,7 @@ riscv64-multilib-empty.patch
|
||||
|
||||
f8e146f3430de3a6cd904f3f3f7aa1bfaefee14c.patch
|
||||
3185c30c54d0af5bffbff3bcfd721668d086ff10.patch
|
||||
|
||||
# bug 974779
|
||||
llvm9-D71443-PPC-MC-redef-symbol.patch
|
||||
llvm-9.0-D78196.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()
|
||||
Loading…
Reference in New Issue
Block a user