From d60813a09544c1b087b97d2d39985410ff816d83 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 25 Oct 2019 00:21:18 +0200 Subject: [PATCH] For some reasons, building compiler-rt with the github method is changing some options. It seems that it adds -m elf_i386 to the linker. Causing a build failure. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942864 https://bugs.llvm.org/show_bug.cgi?id=43677 trying to remove the flag in compiler-rt-fuzzer-remove-elf_i386.diff --- debian/changelog | 6 ++++++ .../patches/compiler-rt-fuzzer-remove-elf_i386.diff | 13 +++++++++++++ debian/patches/series | 1 + 3 files changed, 20 insertions(+) create mode 100644 debian/patches/compiler-rt-fuzzer-remove-elf_i386.diff diff --git a/debian/changelog b/debian/changelog index 0c2ce460..2678e0bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,12 @@ llvm-toolchain-9 (1:9.0.0-2) unstable; urgency=medium So, add to PROJECTS only when enabled * clang: Force the installation of libclang-cpp with the exact same version and remove libclang as dep + * For some reasons, building compiler-rt with the github method + is changing some options. It seems that it adds -m elf_i386 to the + linker. Causing a build failure. + See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942864 + https://bugs.llvm.org/show_bug.cgi?id=43677 + trying to remove the flag in compiler-rt-fuzzer-remove-elf_i386.diff -- Sylvestre Ledru Sun, 20 Oct 2019 17:27:50 +0200 diff --git a/debian/patches/compiler-rt-fuzzer-remove-elf_i386.diff b/debian/patches/compiler-rt-fuzzer-remove-elf_i386.diff new file mode 100644 index 00000000..6ad83dc0 --- /dev/null +++ b/debian/patches/compiler-rt-fuzzer-remove-elf_i386.diff @@ -0,0 +1,13 @@ +Index: llvm-toolchain-snapshot-10~+201910241319490700d0bd3fc88be/compiler-rt/lib/fuzzer/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot-10~+201910241319490700d0bd3fc88be.orig/compiler-rt/lib/fuzzer/CMakeLists.txt ++++ llvm-toolchain-snapshot-10~+201910241319490700d0bd3fc88be/compiler-rt/lib/fuzzer/CMakeLists.txt +@@ -122,7 +122,7 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND + COMPILER_RT_LIBCXXABI_PATH) + macro(partially_link_libcxx name dir arch) + if(${arch} MATCHES "i386") +- set(EMULATION_ARGUMENT "-m" "elf_i386") ++ set(EMULATION_ARGUMENT "") + else() + set(EMULATION_ARGUMENT "") + endif() diff --git a/debian/patches/series b/debian/patches/series index e31d8191..5e610ddb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -132,3 +132,4 @@ clang-riscv64-rv64gc.diff #try-to-unbreak-thinlto.diff D67877.patch disable-lit-cpuid-install.diff +compiler-rt-fuzzer-remove-elf_i386.diff