Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu
Hi, This should fix the rustc's i386 and mips* builds. I tested the i386 part, for mips* will have to see how it goes (and request assistance from the porters if it's not enough). Debdiff attached, and package uploaded. Thanks, Emilio
diff -Nru llvm-toolchain-7-7.0.1/debian/changelog llvm-toolchain-7-7.0.1/debian/changelog --- llvm-toolchain-7-7.0.1/debian/changelog 2019-02-28 13:50:21.000000000 +0100 +++ llvm-toolchain-7-7.0.1/debian/changelog 2020-09-15 13:36:29.000000000 +0200 @@ -1,3 +1,11 @@ +llvm-toolchain-7 (1:7.0.1-8+deb10u1) buster; urgency=medium + + * Non-maintainer upload. + * Fix for unordered cmpxchg instructions when building rustc. + * Disable nomadd4 instructions on mips*. + + -- Emilio Pozuelo Monfort <po...@debian.org> Tue, 15 Sep 2020 13:36:29 +0200 + llvm-toolchain-7 (1:7.0.1-8) unstable; urgency=medium * Fix a segfault in autopkgtest by brining diff -Nru llvm-toolchain-7-7.0.1/debian/patches/AtomicExpand-Fix-a-crash-bug-when-lowering-unordered-loads.patch llvm-toolchain-7-7.0.1/debian/patches/AtomicExpand-Fix-a-crash-bug-when-lowering-unordered-loads.patch --- llvm-toolchain-7-7.0.1/debian/patches/AtomicExpand-Fix-a-crash-bug-when-lowering-unordered-loads.patch 1970-01-01 01:00:00.000000000 +0100 +++ llvm-toolchain-7-7.0.1/debian/patches/AtomicExpand-Fix-a-crash-bug-when-lowering-unordered-loads.patch 2020-09-15 13:33:01.000000000 +0200 @@ -0,0 +1,28 @@ +From 2153c4b8281c1e5f25887ef9183947198c50a9d2 Mon Sep 17 00:00:00 2001 +From: Philip Reames <listm...@philipreames.com> +Date: Tue, 19 Mar 2019 17:20:49 +0000 +Subject: [PATCH] [AtomicExpand] Fix a crash bug when lowering unordered loads + to cmpxchg + +Add tests for wider atomic loads and stores. In the process, fix a crasher where we appearently handled unorder stores, but not loads, when lowering to cmpxchg idioms. + +llvm-svn: 356482 +--- + llvm/lib/CodeGen/AtomicExpandPass.cpp | 3 + + llvm/test/CodeGen/X86/atomic-unordered.ll | 234 +++++++++++++++++++--- + 2 files changed, 213 insertions(+), 24 deletions(-) + +diff --git a/lib/CodeGen/AtomicExpandPass.cpp b/lib/CodeGen/AtomicExpandPass.cpp +index 10dd21d1ef9d..7a8013abccfb 100644 +--- a/lib/CodeGen/AtomicExpandPass.cpp ++++ b/lib/CodeGen/AtomicExpandPass.cpp +@@ -430,6 +430,9 @@ bool AtomicExpand::expandAtomicLoadToLL(LoadInst *LI) { + bool AtomicExpand::expandAtomicLoadToCmpXchg(LoadInst *LI) { + IRBuilder<> Builder(LI); + AtomicOrdering Order = LI->getOrdering(); ++ if (Order == AtomicOrdering::Unordered) ++ Order = AtomicOrdering::Monotonic; ++ + Value *Addr = LI->getPointerOperand(); + Type *Ty = cast<PointerType>(Addr->getType())->getElementType(); + Constant *DummyVal = Constant::getNullValue(Ty); diff -Nru llvm-toolchain-7-7.0.1/debian/patches/mips-force-nomadd4.diff llvm-toolchain-7-7.0.1/debian/patches/mips-force-nomadd4.diff --- llvm-toolchain-7-7.0.1/debian/patches/mips-force-nomadd4.diff 1970-01-01 01:00:00.000000000 +0100 +++ llvm-toolchain-7-7.0.1/debian/patches/mips-force-nomadd4.diff 2020-09-15 13:34:42.000000000 +0200 @@ -0,0 +1,18 @@ +The MIPS port aims to support the Loongson 3 family of CPUs in addition +of the other MIPS CPUs. On the Loongson 3 family the MADD4 instructions +are fused, while they are not fused on the other MIPS CPUs. In order to +support both, we have to disabled those instructions. + +For that, the patch below basically corresponds to the --with-madd4=no +used on the GCC side. + +--- a/clang/lib/Basic/Targets/Mips.h ++++ b/clang/lib/Basic/Targets/Mips.h +@@ -306,6 +306,7 @@ public: + FloatABI = HardFloat; + DspRev = NoDSP; + HasFP64 = isFP64Default(); ++ DisableMadd4 = true; + + for (const auto &Feature : Features) { + if (Feature == "+single-float") diff -Nru llvm-toolchain-7-7.0.1/debian/patches/series llvm-toolchain-7-7.0.1/debian/patches/series --- llvm-toolchain-7-7.0.1/debian/patches/series 2019-02-28 13:49:26.000000000 +0100 +++ llvm-toolchain-7-7.0.1/debian/patches/series 2020-09-15 13:31:10.000000000 +0200 @@ -161,3 +161,5 @@ kfreebsd/lldb_source_Plugins_Process_FreeBSD.diff kfreebsd/tools_llvm-shlib_CMakeLists.txt.diff kfreebsd/include_llvm_MC_MCELFObjectWriter.h.diff +AtomicExpand-Fix-a-crash-bug-when-lowering-unordered-loads.patch +mips-force-nomadd4.diff