Merge remote-tracking branch 'origin/11' into snapshot

This commit is contained in:
Sylvestre Ledru 2020-09-02 14:05:12 +02:00
commit 1a8415589f
8 changed files with 272 additions and 5 deletions

130
debian/changelog vendored
View File

@ -24,6 +24,81 @@ llvm-toolchain-snapshot (1:12~++20200715052739+d6e79e3dd6d-1~exp1) experimental;
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 08 Jul 2020 15:19:14 +0200
llvm-toolchain-11 (1:11.0.0~+rc2-5) unstable; urgency=medium
[ John Paul Adrian Glaubitz ]
* Link against libatomic on powerpc to fix FTBFS in stage2
* Use dh-exec to exclude lib/libPolly*.a on powerpc and
powerpcspe from libclang-common-X.Y-dev.install.in
[ Gianfranco Costamagna ]
* autopkgtests: ignore binfmts enable command return value.
-- Gianfranco Costamagna <locutusofborg@debian.org> Mon, 31 Aug 2020 12:26:58 +0200
llvm-toolchain-11 (1:11.0.0~+rc2-4) unstable; urgency=medium
* integration-test-suite-test: change the configuration for 11
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 28 Aug 2020 23:08:33 +0200
llvm-toolchain-11 (1:11.0.0~+rc2-3) unstable; urgency=medium
* Fix testsuite by ignoring binfmts test
(can't be enabled on autopkgtests)
-- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 28 Aug 2020 21:56:49 +0200
llvm-toolchain-11 (1:11.0.0~+rc2-2) unstable; urgency=medium
[ Gianfranco Costamagna ]
* Disable ocaml support on i386, not reasonable to support it there
(specially for Ubuntu)
* Enable binfmt support before using it in tests, to fix them
[ Sylvestre Ledru ]
* Also link against -latomic on mipsel to fix
/usr/[...]/atomic_base.h:426: undefined reference to `__atomic_load_8'
for lld to fix the FTBFS
* Fix a FTBFS on armel with libcxx-armhf-ftbfs.diff
atomic:2780:16: error: use of undeclared identifier '__libcpp_signed_lock_free'
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
^
atomic:2781:16: error: unknown type name '__libcpp_unsigned_lock_free'; did you mean 'atomic_signed_lock_free'?
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 25 Aug 2020 10:44:00 +0200
llvm-toolchain-11 (1:11.0.0~+rc2-1) unstable; urgency=medium
* New snapshot release
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 20 Aug 2020 22:17:47 +0200
llvm-toolchain-11 (1:11.0.0~+rc1-2) unstable; urgency=medium
* Don't install ompt-multiplex.h on armhf, mipsel and mips64el
(Closes: #967944)
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 05 Aug 2020 15:23:25 +0200
llvm-toolchain-11 (1:11.0.0~+rc1-1) unstable; urgency=medium
* Testing release
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 29 Jul 2020 17:46:57 +0200
llvm-toolchain-11 (1:11~++20200715043845+0e377e253c1-1~exp1) experimental; urgency=medium
[ Sylvestre Ledru ]
* branching of snapshot into 11
[ Samuel Thibault ]
* debian/patches/hurd/hurd-EIEIO-undef.diff: Remove, upstreamed.
* debian/patches/hurd/hurd-cxx-paths.diff: Remove, upstreamed.
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 15 Jul 2020 16:30:36 +0200
llvm-toolchain-snapshot (1:11~++20200701093119+ffee8040534-1~exp1) experimental; urgency=medium
* New snapshot release
@ -141,6 +216,61 @@ llvm-toolchain-snapshot (1:11~++20200123111717+04fd2041561-1~exp1) experimental;
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 23 Jan 2020 14:52:30 +0100
llvm-toolchain-10 (1:10.0.1-6) unstable; urgency=medium
* Add debian/* to the copyright file. Uses the same license
as LLVM
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 02 Sep 2020 13:55:46 +0200
llvm-toolchain-10 (1:10.0.1-5) unstable; urgency=medium
[ John Paul Adrian Glaubitz ]
* Use dh-exec to exclude lib/libPolly*.a on powerpc and
powerpcspe from libclang-common-X.Y-dev.install.in
[ Gianfranco Costamagna ]
* autopkgtests: ignore binfmts enable command return value.
-- Gianfranco Costamagna <locutusofborg@debian.org> Mon, 31 Aug 2020 12:28:24 +0200
llvm-toolchain-10 (1:10.0.1-4) unstable; urgency=medium
* Fix testsuite by ignoring binfmts test
(can't be enabled on autopkgtests)
-- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 28 Aug 2020 21:54:05 +0200
llvm-toolchain-10 (1:10.0.1-3) unstable; urgency=medium
* Fix testsuite by enabling binfmts support before using it
(the default is disabled)
-- Gianfranco Costamagna <locutusofborg@debian.org> Thu, 27 Aug 2020 12:42:20 +0200
llvm-toolchain-10 (1:10.0.1-2) unstable; urgency=medium
[ Samuel Thibault ]
* patches/hurd/hurd-cxx-paths.diff: Refresh, some of the factorization was
backported from 11 to 10.
[ Gianfranco Costamagna ]
* debian/patches/mips-force-nomadd4.patch: Apply and rebase patch to disable
nomadd4 on mips* (Closes: #964989)
- thanks Yunqiang Su <wzssyqa@gmail.com> for the patch
[ Steve Langasek ]
* Drop ocaml support on i386, which pulls in a series of packages which
is not reasonable to support.
-- Gianfranco Costamagna <locutusofborg@debian.org> Sun, 23 Aug 2020 22:57:55 +0200
llvm-toolchain-10 (1:10.0.1-1) unstable; urgency=medium
* New release
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 21 Jul 2020 18:29:06 +0200
llvm-toolchain-10 (1:10.0.1~+rc4-1) unstable; urgency=medium
* New RC release (of course, I was wrong)

6
debian/control vendored
View File

@ -1,4 +1,4 @@
Source: llvm-toolchain-snapshot
Source: llvm-toolchain-11
Section: devel
Priority: optional
Rules-Requires-Root: no
@ -22,8 +22,8 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils,
Build-Conflicts: oprofile, ocaml
Standards-Version: 4.2.1
Homepage: https://www.llvm.org/
Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b snapshot
Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/snapshot
Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b 11
Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/11
# ------------- clang -------------

22
debian/copyright vendored
View File

@ -24,6 +24,28 @@ License: APACHE-2-LLVM-EXCEPTIONS
the License, but only in their entirety and only with respect to the Combined
Software.
Files: debian/*
Copyright: 2003-2020 Sylvestre Ledru and others
License: APACHE-2-LLVM-EXCEPTIONS
On Debian systems the full text of the Apache Software License 2.0 can be
found in the `/usr/share/common-licenses/Apache-2.0' file.
.
---- LLVM Exceptions to the Apache 2.0 License ----
.
As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into an Object form of such source code, you
may redistribute such embedded portions in such Object form without complying
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
.
In addition, if you combine or link compiled forms of this Software with
software that is licensed under the GPLv2 ("Combined Software") and if a
court of competent jurisdiction determines that the patent provision (Section
3), the indemnity provision (Section 9) or other Section of the License
conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.
Files: compiler-rt/lib/BlocksRuntime/*
lldb/tools/debugserver/source/MacOSX/stack_logging.h
Copyright: 2008-2010 Apple, Inc.

View File

@ -1,7 +1,8 @@
#!/usr/bin/dh-exec
/usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/include/omp*.h
/usr/lib/llvm-@LLVM_VERSION@/include/ompt-multiplex.h
[!armhf !mips64el !mipsel] /usr/lib/llvm-@LLVM_VERSION@/include/ompt-multiplex.h
>>>>>>> origin/11
/usr/lib/llvm-@LLVM_VERSION@/lib/libgomp.so
/usr/lib/llvm-@LLVM_VERSION@/lib/libiomp5.so
/usr/lib/llvm-@LLVM_VERSION@/lib/libomp*.so

20
debian/patches/libcxx-armhf-ftbfs.diff vendored Normal file
View File

@ -0,0 +1,20 @@
Index: llvm-toolchain-11-11.0.0~+rc2/libcxx/include/atomic
===================================================================
--- llvm-toolchain-11-11.0.0~+rc2.orig/libcxx/include/atomic
+++ llvm-toolchain-11-11.0.0~+rc2/libcxx/include/atomic
@@ -2775,10 +2775,15 @@ typedef conditional<_LIBCPP_CONTENTION_L
typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type __libcpp_unsigned_lock_free;
#else
// No signed/unsigned lock-free types
+#define NO_LOCK_FREE
#endif
+#ifndef NO_LOCK_FREE
typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
+#endif
+
+#undef NO_LOCK_FREE
#define ATOMIC_FLAG_INIT {false}
#define ATOMIC_VAR_INIT(__v) {__v}

92
debian/patches/mips-force-nomadd4.patch vendored Normal file
View File

@ -0,0 +1,92 @@
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.
Index: llvm-toolchain-10-10.0.1~+rc4/clang/lib/Basic/Targets/Mips.h
===================================================================
--- llvm-toolchain-10-10.0.1~+rc4.orig/clang/lib/Basic/Targets/Mips.h
+++ llvm-toolchain-10-10.0.1~+rc4/clang/lib/Basic/Targets/Mips.h
@@ -332,6 +332,8 @@
HasMSA = true;
else if (Feature == "+nomadd4")
DisableMadd4 = true;
+ else if (Feature == "-nomadd4")
+ DisableMadd4 = false;
else if (Feature == "+fp64")
FPMode = FP64;
else if (Feature == "-fp64")
Index: llvm-toolchain-10-10.0.1~+rc4/llvm/lib/Target/Mips/MipsSubtarget.cpp
===================================================================
--- llvm-toolchain-10-10.0.1~+rc4.orig/llvm/lib/Target/Mips/MipsSubtarget.cpp
+++ llvm-toolchain-10-10.0.1~+rc4/llvm/lib/Target/Mips/MipsSubtarget.cpp
@@ -79,7 +79,7 @@
InMips16Mode(false), InMips16HardFloat(Mips16HardFloat),
InMicroMipsMode(false), HasDSP(false), HasDSPR2(false), HasDSPR3(false),
AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false),
- UseTCCInDIV(false), HasSym32(false), HasEVA(false), DisableMadd4(false),
+ UseTCCInDIV(false), HasSym32(false), HasEVA(false), DisableMadd4(true),
HasMT(false), HasCRC(false), HasVirt(false), HasGINV(false),
UseIndirectJumpsHazard(false), StackAlignOverride(StackAlignOverride),
TM(TM), TargetTriple(TT), TSInfo(),
@@ -91,6 +91,9 @@
if (MipsArchVersion == MipsDefault)
MipsArchVersion = Mips32;
+ if (hasMips32r6() || hasMips64r6())
+ DisableMadd4 = false;
+
// Don't even attempt to generate code for MIPS-I and MIPS-V. They have not
// been tested and currently exist for the integrated assembler only.
if (MipsArchVersion == Mips1)
@@ -238,6 +241,7 @@
MipsSubtarget::initializeSubtargetDependencies(StringRef CPU, StringRef FS,
const TargetMachine &TM) {
std::string CPUName = MIPS_MC::selectMipsCPU(TM.getTargetTriple(), CPU);
+ SubtargetFeatures Features(FS);
// Parse features string.
ParseSubtargetFeatures(CPUName, FS);
@@ -260,6 +264,13 @@
report_fatal_error("64-bit code requested on a subtarget that doesn't "
"support it!");
+ for (const std::string &Feature : Features.getFeatures()) {
+ if (Feature == "+nomadd4")
+ DisableMadd4 = true;
+ else if (Feature == "-nomadd4")
+ DisableMadd4 = false;
+ }
+
return *this;
}
Index: llvm-toolchain-10-10.0.1~+rc4/llvm/lib/Target/Mips/Mips.td
===================================================================
--- llvm-toolchain-10-10.0.1~+rc4.orig/llvm/lib/Target/Mips/Mips.td
+++ llvm-toolchain-10-10.0.1~+rc4/llvm/lib/Target/Mips/Mips.td
@@ -205,7 +205,7 @@
"UseTCCInDIV", "false",
"Force the assembler to use trapping">;
-def FeatureMadd4
+def FeatureNoMadd4
: SubtargetFeature<"nomadd4", "DisableMadd4", "true",
"Disable 4-operand madd.fmt and related instructions">;
Index: llvm-toolchain-10-10.0.1~+rc4/llvm/lib/Target/Mips/MipsInstrInfo.td
===================================================================
--- llvm-toolchain-10-10.0.1~+rc4.orig/llvm/lib/Target/Mips/MipsInstrInfo.td
+++ llvm-toolchain-10-10.0.1~+rc4/llvm/lib/Target/Mips/MipsInstrInfo.td
@@ -242,7 +242,7 @@
def HasMSA : Predicate<"Subtarget->hasMSA()">,
AssemblerPredicate<"FeatureMSA">;
def HasMadd4 : Predicate<"!Subtarget->disableMadd4()">,
- AssemblerPredicate<"!FeatureMadd4">;
+ AssemblerPredicate<"!FeatureNoMadd4">;
def HasMT : Predicate<"Subtarget->hasMT()">,
AssemblerPredicate<"FeatureMT">;
def UseIndirectJumpsHazard : Predicate<"Subtarget->useIndirectJumpsHazard()">,

View File

@ -136,3 +136,4 @@ disable-fuzzer-compiler-rt-x86.diff
python3-shebang.patch
print-lldb-path.patch
libcxx-armhf-ftbfs.diff

View File

@ -294,7 +294,8 @@ fi
clang-$VERSION -O3 -emit-llvm foo.c -c -o foo.bc
chmod +x foo.bc
# only run if the binfmt is installed correctly
if /usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> /dev/null; then
/usr/sbin/update-binfmts --display llvm-$VERSION-runtime.binfmt &> foo.log || true
if grep -q "interpreter = /usr/bin/lli-" foo.log; then
/usr/sbin/update-binfmts --enable llvm-$VERSION-runtime.binfmt || true
if ! ./foo.bc|grep -q "lli foo"; then
echo "executing ./foo.bc failed"