mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-28 01:06:21 +00:00
* Include upstream patch D71028 for rust mips tests (Closes: #946874)
* Include upstream patch D60657 for rust support on riscv64. * New stable release * Team upload. * Commit Breaks/Replaces into git * Fix llvm-9-tools Breaks/Replaces libclang-common-9-dev (<< 1:9.0.1~+rc2) (Closes: #946473) * New snapshot release + upload to unstable * Use secure URI in debian/watch. * Move source package lintian overrides to debian/source. * Remove patches force-gcc-header-obj.diff, hurd-pathmax.diff, impl- path-hurd.diff, libcxxabi-arm-ehabi-fix.patch, libcxxabi-test-don-t- fail-extended-long-double.patch, revert-change-soname.diff, try-to- unbreak-thinlto.diff that are missing from debian/patches/series. * Rely on pre-initialized dpkg-architecture variables. * Move transitional package libclang-cpp1-9 to oldlibs/optional per policy 4.0.1. * llvm-riscv64-fix-cffi.diff: backport patch to fix CFI directives on riscv64 from master. * New snapshot release * Fix some paths, upstream moved from site-packages to dist-packages for python packages * Move yaml-bench from libclang-common-X.Y-dev to llvm-X.Y-tools where it belongs See http://lists.llvm.org/pipermail/llvm-dev/2019-December/137337.html * Add a project in the cmake-test to silent a warning (Closes: #945489) * New snapshot release * Patch cmake files to disable the z3 support in Ubuntu * Simplify rules file to put -g1 everywhere * Add a project in the cmake-test to silent a warning (Closes: #945489)
This commit is contained in:
commit
159d6777aa
80
debian/changelog
vendored
80
debian/changelog
vendored
@ -138,7 +138,85 @@ llvm-toolchain-snapshot (1:10~svn366440-1~exp1) experimental; urgency=medium
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 18 Jul 2019 18:58:32 +0200
|
||||
|
||||
llvm-toolchain-9 (1:9.0.0-4) UNRELEASED; urgency=medium
|
||||
llvm-toolchain-9 (1:9.0.1-2) unstable; urgency=medium
|
||||
|
||||
[ James Clarke ]
|
||||
* Include upstream patch D71028 for rust mips tests (Closes: #946874)
|
||||
|
||||
[ Aurelien Jarno ]
|
||||
* Include upstream patch D60657 for rust support on riscv64.
|
||||
|
||||
-- James Clarke <jrtc27@debian.org> Fri, 20 Dec 2019 18:30:29 +0000
|
||||
|
||||
llvm-toolchain-9 (1:9.0.1-1) unstable; urgency=medium
|
||||
|
||||
* New stable release
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 19 Dec 2019 13:48:21 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.1~+rc3-2) unstable; urgency=medium
|
||||
|
||||
* Team upload.
|
||||
[ Gianfranco Costamagna ]
|
||||
* Commit Breaks/Replaces into git
|
||||
|
||||
[ Julian Andres Klode ]
|
||||
* Fix llvm-9-tools Breaks/Replaces libclang-common-9-dev (<< 1:9.0.1~+rc2)
|
||||
(Closes: #946473)
|
||||
|
||||
-- Gianfranco Costamagna <locutusofborg@debian.org> Thu, 19 Dec 2019 00:26:04 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.1~+rc3-1) unstable; urgency=medium
|
||||
|
||||
[ Sylvestre Ledru ]
|
||||
* New snapshot release + upload to unstable
|
||||
* Use secure URI in debian/watch.
|
||||
* Move source package lintian overrides to debian/source.
|
||||
* Remove patches force-gcc-header-obj.diff, hurd-pathmax.diff, impl-
|
||||
path-hurd.diff, libcxxabi-arm-ehabi-fix.patch, libcxxabi-test-don-t-
|
||||
fail-extended-long-double.patch, revert-change-soname.diff, try-to-
|
||||
unbreak-thinlto.diff that are missing from debian/patches/series.
|
||||
* Rely on pre-initialized dpkg-architecture variables.
|
||||
* Move transitional package libclang-cpp1-9 to oldlibs/optional per
|
||||
policy 4.0.1.
|
||||
|
||||
[ Aurelien Jarno ]
|
||||
* llvm-riscv64-fix-cffi.diff: backport patch to fix CFI directives on
|
||||
riscv64 from master.
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 14 Dec 2019 12:43:17 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.1~+rc2-1~exp1) experimental; urgency=medium
|
||||
|
||||
* New snapshot release
|
||||
* Fix some paths, upstream moved from site-packages
|
||||
to dist-packages for python packages
|
||||
* Move yaml-bench from libclang-common-X.Y-dev to llvm-X.Y-tools where
|
||||
it belongs
|
||||
See http://lists.llvm.org/pipermail/llvm-dev/2019-December/137337.html
|
||||
* Add a project in the cmake-test to silent a warning
|
||||
(Closes: #945489)
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 03 Dec 2019 07:56:16 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.1~+rc1-1~exp1) experimental; urgency=medium
|
||||
|
||||
* New snapshot release
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 24 Nov 2019 14:51:29 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.0-5) UNRELEASED; urgency=medium
|
||||
|
||||
[ Gianfranco Costamagna ]
|
||||
* Patch cmake files to disable the z3 support in Ubuntu
|
||||
* Simplify rules file to put -g1 everywhere
|
||||
|
||||
[ Sylvestre Ledru ]
|
||||
* Add a project in the cmake-test to silent a warning (Closes: #945489)
|
||||
|
||||
-- Gianfranco Costamagna <locutusofborg@debian.org> Tue, 26 Nov 2019 09:24:38 +0100
|
||||
|
||||
llvm-toolchain-9 (1:9.0.0-4) unstable; urgency=medium
|
||||
|
||||
[ Samuel Thibault ]
|
||||
* hurd-cxx-paths.diff: Re-introduce patch to find C++ headers.
|
||||
|
4
debian/control
vendored
4
debian/control
vendored
@ -169,7 +169,6 @@ Description: Clang library - Common development package
|
||||
Package: libclang-cpp1-10
|
||||
Depends: libclang-cpp10, ${misc:Depends}
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: oldlibs
|
||||
Description: transitional package
|
||||
This is a transitional package. It can safely be removed.
|
||||
@ -339,6 +338,9 @@ Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, python, python3,
|
||||
python-pygments, python-yaml,
|
||||
python3-pygments, python3-yaml,
|
||||
# Because of yaml-bench
|
||||
Breaks: libclang-common-10-dev (<< 10~+201911120943210600592dd459242-1~exp2)
|
||||
Replaces: libclang-common-10-dev (<< 10~+201911120943210600592dd459242-1~exp2)
|
||||
Description: Modular compiler and toolchain technologies, tools
|
||||
LLVM is a collection of libraries and tools that make it easy to build
|
||||
compilers, optimizers, just-in-time code generators, and many other
|
||||
|
4
debian/libclang-common-X.Y-dev.install.in
vendored
4
debian/libclang-common-X.Y-dev.install.in
vendored
@ -4,8 +4,4 @@ usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/lib
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/*.txt
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION@*/share/*.txt
|
||||
|
||||
usr/lib/llvm-@LLVM_VERSION@/bin/yaml-bench
|
||||
|
||||
usr/bin/yaml-bench-@LLVM_VERSION@
|
||||
|
||||
|
||||
|
2
debian/liblldb-7.install.kfreebsd
vendored
2
debian/liblldb-7.install.kfreebsd
vendored
@ -1,2 +0,0 @@
|
||||
usr/lib/llvm-7/lib/liblldb-7.so.1 /usr/lib/i386-kfreebsd-gnu/
|
||||
#usr/lib/llvm-7/lib/python2.7/site-packages/readline.so
|
1
debian/liblldb-X.Y.install.in
vendored
1
debian/liblldb-X.Y.install.in
vendored
@ -1,4 +1,3 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/liblldb-@LLVM_VERSION@.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/
|
||||
#usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/readline.so
|
||||
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/liblldbIntelFeatures.so.*
|
||||
|
1
debian/llvm-X.Y-dev.install.in
vendored
1
debian/llvm-X.Y-dev.install.in
vendored
@ -29,4 +29,3 @@ llvm/utils/vim/llvm-@LLVM_VERSION@-vimrc usr/share/vim/addons
|
||||
llvm/utils/emacs/emacs.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
||||
llvm/utils/emacs/llvm-mode.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
||||
llvm/utils/emacs/tablegen-mode.el usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
|
||||
|
||||
|
3
debian/llvm-X.Y-tools.install.in
vendored
3
debian/llvm-X.Y-tools.install.in
vendored
@ -2,6 +2,7 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/bin/count
|
||||
usr/lib/llvm-@LLVM_VERSION@/bin/FileCheck
|
||||
usr/lib/llvm-@LLVM_VERSION@/bin/not
|
||||
usr/lib/llvm-@LLVM_VERSION@/bin/yaml-bench
|
||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/opt-viewer.py
|
||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/optrecord.py
|
||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/style.css
|
||||
@ -9,8 +10,10 @@ usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/opt-diff.py
|
||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/optpmap.py
|
||||
usr/lib/llvm-@LLVM_VERSION@/share/opt-viewer/opt-stats.py
|
||||
|
||||
|
||||
llvm/utils/lit/* /usr/lib/llvm-@LLVM_VERSION@/build/utils/lit/
|
||||
|
||||
usr/bin/count-@LLVM_VERSION@
|
||||
usr/bin/FileCheck-@LLVM_VERSION@
|
||||
usr/bin/not-@LLVM_VERSION@
|
||||
usr/bin/yaml-bench-@LLVM_VERSION@
|
||||
|
2
debian/orig-tar.sh
vendored
2
debian/orig-tar.sh
vendored
@ -127,7 +127,7 @@ else
|
||||
fi
|
||||
git_tag="llvmorg-$EXACT_VERSION"
|
||||
VERSION=$EXACT_VERSION
|
||||
if test -n "$TAG" -a -z "$FINAL_RELEASE"; then
|
||||
if test -n "$TAG"; then
|
||||
git_tag="$git_tag-$TAG"
|
||||
VERSION="$VERSION~+$TAG"
|
||||
fi
|
||||
|
126
debian/patches/D60657-riscv-pcrel_lo.diff
vendored
Normal file
126
debian/patches/D60657-riscv-pcrel_lo.diff
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
commit 41449c58c58e466bcf9cdc4f7415950382bad8d7
|
||||
Author: Roger Ferrer Ibanez <roger.ferrer@bsc.es>
|
||||
Date: Fri Nov 8 08:26:30 2019 +0000
|
||||
|
||||
[RISCV] Fix evaluation of %pcrel_lo
|
||||
|
||||
The following testcase
|
||||
|
||||
function:
|
||||
.Lpcrel_label1:
|
||||
auipc a0, %pcrel_hi(other_function)
|
||||
addi a1, a0, %pcrel_lo(.Lpcrel_label1)
|
||||
.p2align 2 # Causes a new fragment to be emitted
|
||||
|
||||
.type other_function,@function
|
||||
other_function:
|
||||
ret
|
||||
|
||||
exposes an odd behaviour in which only the %pcrel_hi relocation is
|
||||
evaluated but not the %pcrel_lo.
|
||||
|
||||
$ llvm-mc -triple riscv64 -filetype obj t.s | llvm-objdump -d -r -
|
||||
|
||||
<stdin>: file format ELF64-riscv
|
||||
|
||||
Disassembly of section .text:
|
||||
0000000000000000 function:
|
||||
0: 17 05 00 00 auipc a0, 0
|
||||
4: 93 05 05 00 mv a1, a0
|
||||
0000000000000004: R_RISCV_PCREL_LO12_I other_function+4
|
||||
|
||||
0000000000000008 other_function:
|
||||
8: 67 80 00 00 ret
|
||||
|
||||
The reason seems to be that in RISCVAsmBackend::shouldForceRelocation we
|
||||
only consider the fragment but in RISCVMCExpr::evaluatePCRelLo we
|
||||
consider the section. This usually works but there are cases where the
|
||||
section may still be the same but the fragment may be another one. In
|
||||
that case we end forcing a %pcrel_lo relocation without any %pcrel_hi.
|
||||
|
||||
This patch makes RISCVAsmBackend::shouldForceRelocation use the section,
|
||||
if any, to determine if the relocation must be forced or not.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D60657
|
||||
|
||||
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
|
||||
index f6b727ae37c..5881a0a86ef 100644
|
||||
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
|
||||
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
|
||||
@@ -64,11 +64,15 @@ bool RISCVAsmBackend::shouldForceRelocation(const MCAssembler &Asm,
|
||||
case RISCV::fixup_riscv_tls_gd_hi20:
|
||||
ShouldForce = true;
|
||||
break;
|
||||
- case RISCV::fixup_riscv_pcrel_hi20:
|
||||
- ShouldForce = T->getValue()->findAssociatedFragment() !=
|
||||
- Fixup.getValue()->findAssociatedFragment();
|
||||
+ case RISCV::fixup_riscv_pcrel_hi20: {
|
||||
+ MCFragment *TFragment = T->getValue()->findAssociatedFragment();
|
||||
+ MCFragment *FixupFragment = Fixup.getValue()->findAssociatedFragment();
|
||||
+ assert(FixupFragment && "We should have a fragment for this fixup");
|
||||
+ ShouldForce =
|
||||
+ !TFragment || TFragment->getParent() != FixupFragment->getParent();
|
||||
break;
|
||||
}
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
|
||||
diff --git a/llvm/test/MC/RISCV/pcrel-fixups.s b/llvm/test/MC/RISCV/pcrel-fixups.s
|
||||
new file mode 100644
|
||||
index 00000000000..1025988967a
|
||||
--- /dev/null
|
||||
+++ b/llvm/test/MC/RISCV/pcrel-fixups.s
|
||||
@@ -0,0 +1,52 @@
|
||||
+# RUN: llvm-mc -triple riscv32 -mattr=-relax -filetype obj %s \
|
||||
+# RUN: | llvm-objdump -M no-aliases -d -r - \
|
||||
+# RUN: | FileCheck --check-prefix NORELAX %s
|
||||
+# RUN: llvm-mc -triple riscv32 -mattr=+relax -filetype obj %s \
|
||||
+# RUN: | llvm-objdump -M no-aliases -d -r - \
|
||||
+# RUN: | FileCheck --check-prefix RELAX %s
|
||||
+# RUN: llvm-mc -triple riscv64 -mattr=-relax -filetype obj %s \
|
||||
+# RUN: | llvm-objdump -M no-aliases -d -r - \
|
||||
+# RUN: | FileCheck --check-prefix NORELAX %s
|
||||
+# RUN: llvm-mc -triple riscv64 -mattr=+relax -filetype obj %s \
|
||||
+# RUN: | llvm-objdump -M no-aliases -d -r - \
|
||||
+# RUN: | FileCheck --check-prefix RELAX %s
|
||||
+
|
||||
+# Fixups for %pcrel_hi / %pcrel_lo can be evaluated within a section,
|
||||
+# regardless of the fragment containing the target address.
|
||||
+
|
||||
+function:
|
||||
+.Lpcrel_label1:
|
||||
+ auipc a0, %pcrel_hi(other_function)
|
||||
+ addi a1, a0, %pcrel_lo(.Lpcrel_label1)
|
||||
+# NORELAX: auipc a0, 0
|
||||
+# NORELAX-NOT: R_RISCV
|
||||
+# NORELAX: addi a1, a0, 16
|
||||
+# NORELAX-NOT: R_RISCV
|
||||
+
|
||||
+# RELAX: auipc a0, 0
|
||||
+# RELAX: R_RISCV_PCREL_HI20 other_function
|
||||
+# RELAX: R_RISCV_RELAX *ABS*
|
||||
+# RELAX: addi a1, a0, 0
|
||||
+# RELAX: R_RISCV_PCREL_LO12_I .Lpcrel_label1
|
||||
+# RELAX: R_RISCV_RELAX *ABS*
|
||||
+
|
||||
+ .p2align 2 # Cause a new fragment be emitted here
|
||||
+.Lpcrel_label2:
|
||||
+ auipc a0, %pcrel_hi(other_function)
|
||||
+ addi a1, a0, %pcrel_lo(.Lpcrel_label2)
|
||||
+# NORELAX: auipc a0, 0
|
||||
+# NORELAX-NOT: R_RISCV
|
||||
+# NORELAX: addi a1, a0, 8
|
||||
+# NORELAX-NOT: R_RISCV
|
||||
+
|
||||
+# RELAX: auipc a0, 0
|
||||
+# RELAX: R_RISCV_PCREL_HI20 other_function
|
||||
+# RELAX: R_RISCV_RELAX *ABS*
|
||||
+# RELAX: addi a1, a0, 0
|
||||
+# RELAX: R_RISCV_PCREL_LO12_I .Lpcrel_label2
|
||||
+# RELAX: R_RISCV_RELAX *ABS*
|
||||
+
|
||||
+ .type other_function,@function
|
||||
+other_function:
|
||||
+ ret
|
||||
+
|
5529
debian/patches/D71028-mips-rust-test.diff
vendored
Normal file
5529
debian/patches/D71028-mips-rust-test.diff
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16
debian/patches/force-gcc-header-obj.diff
vendored
16
debian/patches/force-gcc-header-obj.diff
vendored
@ -1,16 +0,0 @@
|
||||
Index: llvm-toolchain-5.0-5.0.2~+rc1/clang/lib/Driver/ToolChains/Linux.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-5.0-5.0.2~+rc1.orig/clang/lib/Driver/ToolChains/Linux.cpp
|
||||
+++ llvm-toolchain-5.0-5.0.2~+rc1/clang/lib/Driver/ToolChains/Linux.cpp
|
||||
@@ -571,6 +571,11 @@ void Linux::AddClangSystemIncludeArgs(co
|
||||
return;
|
||||
}
|
||||
|
||||
+ // Force the inclusion of the gcc headers (objc/objc.h)
|
||||
+ addExternCSystemIncludeIfExists(
|
||||
+ DriverArgs, CC1Args, GCCInstallation.getInstallPath() + "/include");
|
||||
+// std::cout << GCCInstallation.getInstallPath().str() << "/include" << std::endl;
|
||||
+
|
||||
// Lacking those, try to detect the correct set of system includes for the
|
||||
// target triple.
|
||||
|
48
debian/patches/hurd-pathmax.diff
vendored
48
debian/patches/hurd-pathmax.diff
vendored
@ -1,48 +0,0 @@
|
||||
Index: llvm-toolchain-snapshot_9~svn352610/lldb/include/lldb/lldb-defines.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn352610.orig/lldb/include/lldb/lldb-defines.h
|
||||
+++ llvm-toolchain-snapshot_9~svn352610/lldb/include/lldb/lldb-defines.h
|
||||
@@ -27,6 +27,11 @@
|
||||
#define INT32_MAX 2147483647
|
||||
#endif
|
||||
|
||||
+// For GNU Hurd
|
||||
+#if defined(__GNU__) && !defined(PATH_MAX)
|
||||
+# define PATH_MAX 4096
|
||||
+#endif
|
||||
+
|
||||
#if !defined(UINT32_MAX)
|
||||
#define UINT32_MAX 4294967295U
|
||||
#endif
|
||||
Index: llvm-toolchain-snapshot_9~svn352610/llvm/tools/dsymutil/DwarfLinker.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn352610.orig/llvm/tools/dsymutil/DwarfLinker.cpp
|
||||
+++ llvm-toolchain-snapshot_9~svn352610/llvm/tools/dsymutil/DwarfLinker.cpp
|
||||
@@ -100,6 +100,11 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
+// For GNU Hurd
|
||||
+#if defined(__GNU__) && !defined(PATH_MAX)
|
||||
+# define PATH_MAX 4096
|
||||
+#endif
|
||||
+
|
||||
namespace llvm {
|
||||
namespace dsymutil {
|
||||
|
||||
Index: llvm-toolchain-snapshot_9~svn352610/polly/lib/External/ppcg/cuda_common.c
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn352610.orig/polly/lib/External/ppcg/cuda_common.c
|
||||
+++ llvm-toolchain-snapshot_9~svn352610/polly/lib/External/ppcg/cuda_common.c
|
||||
@@ -15,6 +15,11 @@
|
||||
#include "cuda_common.h"
|
||||
#include "ppcg.h"
|
||||
|
||||
+// For GNU Hurd
|
||||
+#if defined(__GNU__) && !defined(PATH_MAX)
|
||||
+# define PATH_MAX 4096
|
||||
+#endif
|
||||
+
|
||||
/* Open the host .cu file and the kernel .hu and .cu files for writing.
|
||||
* Add the necessary includes.
|
||||
*/
|
13
debian/patches/impl-path-hurd.diff
vendored
13
debian/patches/impl-path-hurd.diff
vendored
@ -1,13 +0,0 @@
|
||||
Index: llvm-toolchain-snapshot_9~svn351647/lib/Support/Unix/Path.inc
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn351647.orig/lib/Support/Unix/Path.inc
|
||||
+++ llvm-toolchain-snapshot_9~svn351647/lib/Support/Unix/Path.inc
|
||||
@@ -176,7 +176,7 @@ std::string getMainExecutable(const char
|
||||
|
||||
if (getprogpath(exe_path, argv0) != NULL)
|
||||
return exe_path;
|
||||
-#elif defined(__linux__) || defined(__CYGWIN__)
|
||||
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__)
|
||||
char exe_path[MAXPATHLEN];
|
||||
StringRef aPath("/proc/self/exe");
|
||||
if (sys::fs::exists(aPath)) {
|
118
debian/patches/libcxxabi-arm-ehabi-fix.patch
vendored
118
debian/patches/libcxxabi-arm-ehabi-fix.patch
vendored
@ -1,118 +0,0 @@
|
||||
Fix arm EHABI code to work. armhf had exception test failing without EHABI support.
|
||||
|
||||
No known upstream bug about this. Actual code change is more like workaround than
|
||||
something that upstream would accept. Proper fix would be adding _Unwind_Control_Block
|
||||
to clang unwind.h. _Unwind_Control_Block should also extend _Unwind_Exception to make
|
||||
sure their ABI stays in sync.
|
||||
|
||||
No known upstream bug about this.
|
||||
|
||||
Index: llvm-toolchain-snapshot_9~svn351647/libcxxabi/src/cxa_exception.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn351647.orig/libcxxabi/src/cxa_exception.cpp
|
||||
+++ llvm-toolchain-snapshot_9~svn351647/libcxxabi/src/cxa_exception.cpp
|
||||
@@ -277,15 +277,16 @@ __cxa_throw(void *thrown_object, std::ty
|
||||
|
||||
#ifdef __USING_SJLJ_EXCEPTIONS__
|
||||
_Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
|
||||
-#else
|
||||
+#elif !LIBCXXABI_ARM_EHABI
|
||||
_Unwind_RaiseException(&exception_header->unwindHeader);
|
||||
+#else
|
||||
+ _Unwind_RaiseException(exception_header->unwindHeader);
|
||||
#endif
|
||||
// This only happens when there is no handler, or some unexpected unwinding
|
||||
// error happens.
|
||||
failed_throw(exception_header);
|
||||
}
|
||||
|
||||
-
|
||||
// 2.5.3 Exception Handlers
|
||||
/*
|
||||
The adjusted pointer is computed by the personality routine during phase 1
|
||||
@@ -548,7 +549,11 @@ void __cxa_end_catch() {
|
||||
// to touch a foreign exception in any way, that is undefined
|
||||
// behavior. They likely can't since the only way to catch
|
||||
// a foreign exception is with catch (...)!
|
||||
+#if !LIBCXXABI_ARM_EHABI
|
||||
_Unwind_DeleteException(&globals->caughtExceptions->unwindHeader);
|
||||
+#else
|
||||
+ _Unwind_DeleteException(globals->caughtExceptions->unwindHeader);
|
||||
+#endif
|
||||
globals->caughtExceptions = 0;
|
||||
}
|
||||
}
|
||||
@@ -605,8 +610,10 @@ void __cxa_rethrow() {
|
||||
}
|
||||
#ifdef __USING_SJLJ_EXCEPTIONS__
|
||||
_Unwind_SjLj_RaiseException(&exception_header->unwindHeader);
|
||||
-#else
|
||||
+#elif !LIBCXXABI_ARM_EHABI
|
||||
_Unwind_RaiseException(&exception_header->unwindHeader);
|
||||
+#else
|
||||
+ _Unwind_RaiseException(exception_header->unwindHeader);
|
||||
#endif
|
||||
|
||||
// If we get here, some kind of unwinding error has occurred.
|
||||
@@ -730,8 +737,10 @@ __cxa_rethrow_primary_exception(void* th
|
||||
dep_exception_header->unwindHeader.exception_cleanup = dependent_exception_cleanup;
|
||||
#ifdef __USING_SJLJ_EXCEPTIONS__
|
||||
_Unwind_SjLj_RaiseException(&dep_exception_header->unwindHeader);
|
||||
+#elif !LIBCXXABI_ARM_EHABI
|
||||
+ _Unwind_RaiseException(&dep_exception_header->unwindHeader);
|
||||
#else
|
||||
- _Unwind_RaiseException(&dep_exception_header->unwindHeader);
|
||||
+ _Unwind_RaiseException(dep_exception_header->unwindHeader);
|
||||
#endif
|
||||
// Some sort of unwinding error. Note that terminate is a handler.
|
||||
__cxa_begin_catch(&dep_exception_header->unwindHeader);
|
||||
Index: llvm-toolchain-snapshot_9~svn351647/libcxxabi/src/cxa_exception.hpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn351647.orig/libcxxabi/src/cxa_exception.hpp
|
||||
+++ llvm-toolchain-snapshot_9~svn351647/libcxxabi/src/cxa_exception.hpp
|
||||
@@ -28,6 +28,45 @@ uint64_t __getExceptionClass (const _Un
|
||||
void __setExceptionClass ( _Unwind_Exception*, uint64_t);
|
||||
bool __isOurExceptionClass(const _Unwind_Exception*);
|
||||
|
||||
+#if LIBCXXABI_ARM_EHABI
|
||||
+// GCC has _Unwind_Control_Block in unwind.h (unwind_arm_common.h)
|
||||
+#if defined(__clang__)
|
||||
+struct _Unwind_Control_Block
|
||||
+{
|
||||
+ uint64_t exception_class;
|
||||
+ void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
|
||||
+ struct {
|
||||
+ _Unwind_Word reserved1;
|
||||
+ _Unwind_Word reserved2;
|
||||
+ _Unwind_Word reserved3;
|
||||
+ _Unwind_Word reserved4;
|
||||
+ _Unwind_Word reserved5;
|
||||
+ } unwinder_cache;
|
||||
+ struct {
|
||||
+ _Unwind_Word sp;
|
||||
+ _Unwind_Word bitpattern[5];
|
||||
+ } barrier_cache;
|
||||
+ struct {
|
||||
+ _Unwind_Word bitpattern[4];
|
||||
+ } cleanup_cache;
|
||||
+ struct {
|
||||
+ _Unwind_Word fnstart;
|
||||
+ _Unwind_Word *ehtp;
|
||||
+ _Unwind_Word additional;
|
||||
+ _Unwind_Word reserved1;
|
||||
+ } pr_cache;
|
||||
+ long long int :0;
|
||||
+ operator _Unwind_Exception*() noexcept
|
||||
+ {
|
||||
+ return reinterpret_cast<_Unwind_Exception*>(this);
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#define _Unwind_Exception _Unwind_Control_Block
|
||||
+#endif
|
||||
+
|
||||
struct _LIBCXXABI_HIDDEN __cxa_exception {
|
||||
#if defined(__LP64__) || defined(_LIBCXXABI_ARM_EHABI)
|
||||
// This is a new field to support C++ 0x exception_ptr.
|
@ -1,17 +0,0 @@
|
||||
Powerpc has extended double that doesn't match x86 coding. Power format would
|
||||
need special tests to verify correctness but for now it is enough to prevent
|
||||
incorrect test from running.
|
||||
|
||||
Index: llvm-toolchain-snapshot_9~svn351647/libcxxabi/test/test_demangle.pass.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_9~svn351647.orig/libcxxabi/test/test_demangle.pass.cpp
|
||||
+++ llvm-toolchain-snapshot_9~svn351647/libcxxabi/test/test_demangle.pass.cpp
|
||||
@@ -29803,7 +29803,7 @@ const char* invalid_cases[] =
|
||||
"NSoERj5E=Y1[uM:ga",
|
||||
"Aon_PmKVPDk7?fg4XP5smMUL6;<WsI_mgbf23cCgsHbT<l8EE\0uVRkNOoXDrgdA4[8IU>Vl<>IL8ayHpiVDDDXTY;^o9;i",
|
||||
"_ZNSt16allocator_traitsISaIN4llvm3sys2fs18directory_iteratorEEE9constructIS3_IS3_EEEDTcl12_S_constructfp_fp0_spcl7forwardIT0_Efp1_EEERS4_PT_DpOS7_",
|
||||
-#if !LDBL_FP80
|
||||
+#if !LDBL_FP80 && __LDBL_MANT_DIG__ < 64
|
||||
"_ZN5test01hIfEEvRAcvjplstT_Le4001a000000000000000E_c",
|
||||
#endif
|
||||
// The following test cases were found by libFuzzer+ASAN
|
76
debian/patches/llvm-riscv64-fix-cffi.diff
vendored
Normal file
76
debian/patches/llvm-riscv64-fix-cffi.diff
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
commit c6b09bff5671600f8e764d3847023d0996f328d9
|
||||
Author: Luís Marques <luismarques@lowrisc.org>
|
||||
Date: Thu Nov 14 18:27:42 2019 +0000
|
||||
|
||||
[RISCV] Fix wrong CFI directives
|
||||
|
||||
Summary: Removes CFI CFA directives that could incorrectly propagate
|
||||
beyond the basic block they were inteded for. Specifically it removes
|
||||
the epilogue CFI directives. See the branch_and_tail_call test for an
|
||||
example of the issue. Should fix the stack unwinding issues caused by
|
||||
the incorrect directives.
|
||||
|
||||
Reviewers: asb, lenary, shiva0217
|
||||
Reviewed By: lenary
|
||||
Tags: #llvm
|
||||
Differential Revision: https://reviews.llvm.org/D69723
|
||||
|
||||
--- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
|
||||
+++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
|
||||
@@ -205,7 +205,6 @@
|
||||
MachineFrameInfo &MFI = MF.getFrameInfo();
|
||||
auto *RVFI = MF.getInfo<RISCVMachineFunctionInfo>();
|
||||
DebugLoc DL = MBBI->getDebugLoc();
|
||||
- const RISCVInstrInfo *TII = STI.getInstrInfo();
|
||||
unsigned FPReg = getFPReg(STI);
|
||||
unsigned SPReg = getSPReg(STI);
|
||||
|
||||
@@ -225,48 +224,9 @@
|
||||
adjustReg(MBB, LastFrameDestroy, DL, SPReg, FPReg, -FPOffset,
|
||||
MachineInstr::FrameDestroy);
|
||||
}
|
||||
-
|
||||
- if (hasFP(MF)) {
|
||||
- // To find the instruction restoring FP from stack.
|
||||
- for (auto &I = LastFrameDestroy; I != MBBI; ++I) {
|
||||
- if (I->mayLoad() && I->getOperand(0).isReg()) {
|
||||
- unsigned DestReg = I->getOperand(0).getReg();
|
||||
- if (DestReg == FPReg) {
|
||||
- // If there is frame pointer, after restoring $fp registers, we
|
||||
- // need adjust CFA to ($sp - FPOffset).
|
||||
- // Emit ".cfi_def_cfa $sp, -FPOffset"
|
||||
- unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfa(
|
||||
- nullptr, RI->getDwarfRegNum(SPReg, true), -FPOffset));
|
||||
- BuildMI(MBB, std::next(I), DL,
|
||||
- TII->get(TargetOpcode::CFI_INSTRUCTION))
|
||||
- .addCFIIndex(CFIIndex);
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- // Add CFI directives for callee-saved registers.
|
||||
- const std::vector<CalleeSavedInfo> &CSI = MFI.getCalleeSavedInfo();
|
||||
- // Iterate over list of callee-saved registers and emit .cfi_restore
|
||||
- // directives.
|
||||
- for (const auto &Entry : CSI) {
|
||||
- unsigned Reg = Entry.getReg();
|
||||
- unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createRestore(
|
||||
- nullptr, RI->getDwarfRegNum(Reg, true)));
|
||||
- BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
|
||||
- .addCFIIndex(CFIIndex);
|
||||
- }
|
||||
|
||||
// Deallocate stack
|
||||
adjustReg(MBB, MBBI, DL, SPReg, SPReg, StackSize, MachineInstr::FrameDestroy);
|
||||
-
|
||||
- // After restoring $sp, we need to adjust CFA to $(sp + 0)
|
||||
- // Emit ".cfi_def_cfa_offset 0"
|
||||
- unsigned CFIIndex =
|
||||
- MF.addFrameInst(MCCFIInstruction::createDefCfaOffset(nullptr, 0));
|
||||
- BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION))
|
||||
- .addCFIIndex(CFIIndex);
|
||||
}
|
||||
|
||||
int RISCVFrameLowering::getFrameIndexReference(const MachineFunction &MF,
|
47
debian/patches/no-z3.patch
vendored
Normal file
47
debian/patches/no-z3.patch
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
Description:
|
||||
Disable z3 to avoid pulling ocaml into main.
|
||||
For some reason the cmake option LLVM_ENABLE_Z3_SOLVER was not taken into account
|
||||
Author: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||
|
||||
Last-Update: 2019-11-26
|
||||
|
||||
Index: llvm-toolchain-9-9.0.0/llvm/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-9-9.0.0.orig/llvm/CMakeLists.txt
|
||||
+++ llvm-toolchain-9-9.0.0/llvm/CMakeLists.txt
|
||||
@@ -340,24 +340,22 @@
|
||||
|
||||
set(LLVM_Z3_INSTALL_DIR "" CACHE STRING "Install directory of the Z3 solver.")
|
||||
|
||||
-find_package(Z3 4.7.1)
|
||||
-
|
||||
-if (LLVM_Z3_INSTALL_DIR)
|
||||
- if (NOT Z3_FOUND)
|
||||
- message(FATAL_ERROR "Z3 >= 4.7.1 has not been found in LLVM_Z3_INSTALL_DIR: ${LLVM_Z3_INSTALL_DIR}.")
|
||||
- endif()
|
||||
-endif()
|
||||
-
|
||||
-set(LLVM_ENABLE_Z3_SOLVER_DEFAULT "${Z3_FOUND}")
|
||||
-
|
||||
option(LLVM_ENABLE_Z3_SOLVER
|
||||
"Enable Support for the Z3 constraint solver in LLVM."
|
||||
- ${LLVM_ENABLE_Z3_SOLVER_DEFAULT}
|
||||
+ ON
|
||||
)
|
||||
|
||||
if (LLVM_ENABLE_Z3_SOLVER)
|
||||
- if (NOT Z3_FOUND)
|
||||
- message(FATAL_ERROR "LLVM_ENABLE_Z3_SOLVER cannot be enabled when Z3 is not available.")
|
||||
+ find_package(Z3 4.7.1)
|
||||
+
|
||||
+ if (LLVM_Z3_INSTALL_DIR)
|
||||
+ if (NOT Z3_FOUND)
|
||||
+ message(FATAL_ERROR "Z3 >= 4.7.1 has not been found in LLVM_Z3_INSTALL_DIR: ${LLVM_Z3_INSTALL_DIR}.")
|
||||
+ endif()
|
||||
+ else()
|
||||
+ if (NOT Z3_FOUND)
|
||||
+ message(FATAL_ERROR "LLVM_ENABLE_Z3_SOLVER cannot be enabled when Z3 is not available.")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
set(LLVM_WITH_Z3 1)
|
65
debian/patches/revert-change-soname.diff
vendored
65
debian/patches/revert-change-soname.diff
vendored
@ -1,65 +0,0 @@
|
||||
Index: tools/llvm-shlib/simple_version_script.map.in
|
||||
===================================================================
|
||||
--- tools/llvm-shlib/simple_version_script.map.in (revision 352580)
|
||||
+++ tools/llvm-shlib/simple_version_script.map.in (revision 352579)
|
||||
@@ -1 +1 @@
|
||||
-LLVM_@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@ { global: *; };
|
||||
+LLVM_@LLVM_VERSION_MAJOR@ { global: *; };
|
||||
Index: tools/llvm-config/CMakeLists.txt
|
||||
===================================================================
|
||||
--- tools/llvm-config/CMakeLists.txt (revision 352580)
|
||||
+++ tools/llvm-config/CMakeLists.txt (revision 352579)
|
||||
@@ -37,7 +37,7 @@
|
||||
set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
|
||||
set(LLVM_BUILD_SYSTEM cmake)
|
||||
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
|
||||
-set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")
|
||||
+set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
|
||||
set(LLVM_HAS_GLOBAL_ISEL "ON")
|
||||
|
||||
# Use the C++ link flags, since they should be a superset of C link flags.
|
||||
Index: cmake/modules/AddLLVM.cmake
|
||||
===================================================================
|
||||
--- cmake/modules/AddLLVM.cmake (revision 352580)
|
||||
+++ cmake/modules/AddLLVM.cmake (revision 352579)
|
||||
@@ -83,7 +83,7 @@
|
||||
# FIXME: Don't write the "local:" line on OpenBSD.
|
||||
# in the export file, also add a linker script to version LLVM symbols (form: LLVM_N.M)
|
||||
add_custom_command(OUTPUT ${native_export_file}
|
||||
- COMMAND echo "LLVM_${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR} {" > ${native_export_file}
|
||||
+ COMMAND echo "LLVM_${LLVM_VERSION_MAJOR} {" > ${native_export_file}
|
||||
COMMAND grep -q "[[:alnum:]]" ${export_file} && echo " global:" >> ${native_export_file} || :
|
||||
COMMAND sed -e "s/$/;/" -e "s/^/ /" < ${export_file} >> ${native_export_file}
|
||||
COMMAND echo " local: *;" >> ${native_export_file}
|
||||
@@ -500,7 +500,7 @@
|
||||
PROPERTIES
|
||||
# Since 4.0.0, the ABI version is indicated by the major version
|
||||
SOVERSION ${LLVM_VERSION_MAJOR}
|
||||
- VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
|
||||
+ VERSION ${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -522,7 +522,7 @@
|
||||
if(${output_name} STREQUAL "output_name-NOTFOUND")
|
||||
set(output_name ${name})
|
||||
endif()
|
||||
- set(library_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX})
|
||||
+ set(library_name ${output_name}-${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX})
|
||||
set(api_name ${output_name}-${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
|
||||
set_target_properties(${name} PROPERTIES OUTPUT_NAME ${library_name})
|
||||
llvm_install_library_symlink(${api_name} ${library_name} SHARED
|
||||
Index: docs/ReleaseNotes.rst
|
||||
===================================================================
|
||||
--- docs/ReleaseNotes.rst (revision 352580)
|
||||
+++ docs/ReleaseNotes.rst (revision 352579)
|
||||
@@ -30,6 +30,9 @@
|
||||
is available on the Visual Studio Marketplace. The new integration
|
||||
supports Visual Studio 2017.
|
||||
|
||||
+* Libraries have been renamed from 7.0 to 7. This change also impacts
|
||||
+ downstream libraries like lldb.
|
||||
+
|
||||
* The LoopInstSimplify pass (``-loop-instsimplify``) has been removed.
|
||||
|
||||
* Symbols starting with ``?`` are no longer mangled by LLVM when using the
|
7
debian/patches/series
vendored
7
debian/patches/series
vendored
@ -125,6 +125,9 @@ bootstrap-fix-include-next.diff
|
||||
|
||||
# riscv64
|
||||
clang-riscv64-multiarch.diff
|
||||
clang-riscv64-rv64gc.diff
|
||||
llvm-riscv64-fix-cffi.diff
|
||||
D60657-riscv-pcrel_lo.diff
|
||||
|
||||
# Compiler-rt - workaround
|
||||
workaround-bug-42994-use-linker.diff
|
||||
@ -133,3 +136,7 @@ workaround-bug-42994-use-linker.diff
|
||||
#try-to-unbreak-thinlto.diff
|
||||
D67877.patch
|
||||
disable-fuzzer-compiler-rt.diff
|
||||
no-z3.patch
|
||||
|
||||
# bug #946874
|
||||
D71028-mips-rust-test.diff
|
||||
|
19
debian/patches/try-to-unbreak-thinlto.diff
vendored
19
debian/patches/try-to-unbreak-thinlto.diff
vendored
@ -1,19 +0,0 @@
|
||||
Index: llvm-toolchain-9-9~+rc3/clang/CMakeLists.txt
|
||||
===================================================================
|
||||
--- llvm-toolchain-9-9~+rc3.orig/clang/CMakeLists.txt
|
||||
+++ llvm-toolchain-9-9~+rc3/clang/CMakeLists.txt
|
||||
@@ -719,11 +719,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
|
||||
if(BOOTSTRAP_LLVM_ENABLE_LLD)
|
||||
set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld)
|
||||
endif()
|
||||
- if(NOT BOOTSTRAP_LLVM_ENABLE_LTO)
|
||||
- add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
|
||||
- set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
|
||||
- set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib)
|
||||
- endif()
|
||||
+ add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
|
||||
+ set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar)
|
||||
+ set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib)
|
||||
add_dependencies(clang-bootstrap-deps llvm-objcopy llvm-strip)
|
||||
set(${CLANG_STAGE}_OBJCOPY -DCMAKE_OBJCOPY=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-objcopy)
|
||||
set(${CLANG_STAGE}_STRIP -DCMAKE_STRIP=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-strip)
|
2
debian/python-lldb-X.Y.install.in
vendored
2
debian/python-lldb-X.Y.install.in
vendored
@ -1 +1 @@
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/*-packages/lldb/
|
||||
|
6
debian/python-lldb-X.Y.links.in
vendored
6
debian/python-lldb-X.Y.links.in
vendored
@ -1,6 +1,6 @@
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/libLLVM-@LLVM_VERSION_FULL@.so.1
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/libLLVM-@LLVM_VERSION@.so.1
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/_lldb.so
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/dist-packages/lldb/libLLVM-@LLVM_VERSION_FULL@.so.1
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/dist-packages/lldb/libLLVM-@LLVM_VERSION@.so.1
|
||||
usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/dist-packages/lldb/_lldb.so
|
||||
usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/ usr/lib/python2.7/dist-packages/lldb
|
||||
|
||||
|
||||
|
13
debian/qualify-clang.sh
vendored
13
debian/qualify-clang.sh
vendored
@ -67,6 +67,19 @@ if ! grep -q -E "scan-build: 0 bugs found." foo.log; then
|
||||
fi
|
||||
rm -rf scan-build
|
||||
|
||||
echo 'namespace mozilla {
|
||||
namespace dom {
|
||||
void foo();
|
||||
}
|
||||
}
|
||||
' > foo.cpp
|
||||
clang-tidy-$VERSION -checks='modernize-concat-nested-namespaces' foo.cpp -extra-arg=-std=c++17 &> foo.log
|
||||
if ! grep -q "nested namespaces can " foo.log; then
|
||||
echo "Clang-tidy didn't detect the issue"
|
||||
cat foo.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Testing clang-$VERSION ..."
|
||||
|
||||
rm -f foo.log
|
||||
|
36
debian/rules
vendored
36
debian/rules
vendored
@ -33,11 +33,7 @@ DISTRO=$(shell lsb_release -sc)
|
||||
|
||||
DH_VERSION := $(shell dpkg -s debhelper | grep '^Version' | awk '{print $$2}')
|
||||
|
||||
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
|
||||
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
|
||||
include /usr/share/dpkg/architecture.mk
|
||||
|
||||
LDFLAGS_EXTRA =
|
||||
CXXFLAGS_EXTRA =
|
||||
@ -70,11 +66,13 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++
|
||||
GCC_VERSION := 4.9
|
||||
endif
|
||||
|
||||
Z3_FLAG=
|
||||
Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=OFF
|
||||
ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libz3-dev) gt 4.7.0; echo $$?),0)
|
||||
# Too old version of gcc. Force 4.9
|
||||
# no ocaml support in main for Ubuntu
|
||||
ifneq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
|
||||
Z3_FLAG = -DLLVM_ENABLE_Z3_SOLVER=ON
|
||||
endif
|
||||
endif
|
||||
|
||||
FORCE_NOT_GCC_9_DISTRO := eoan focal bullseye sid
|
||||
ifneq (,$(filter $(DISTRO),$(FORCE_NOT_GCC_9_DISTRO)))
|
||||
@ -88,15 +86,7 @@ endif
|
||||
export CC=gcc-$(GCC_VERSION)
|
||||
export CXX=g++-$(GCC_VERSION)
|
||||
|
||||
opt_flags = -O2 -DNDEBUG
|
||||
|
||||
# Only enable g1 on archs which needs it (it fixes an OOM during dh_strip due to huge symbols)
|
||||
ifeq ($(DEB_HOST_ARCH_BITS),32)
|
||||
opt_flags += -g1
|
||||
else
|
||||
# Should be -g, but this causes buildd disk space issues
|
||||
opt_flags += -g1
|
||||
endif
|
||||
opt_flags = -O2 -DNDEBUG -g1
|
||||
|
||||
ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
|
||||
opt_flags += -marm
|
||||
@ -386,7 +376,7 @@ override_dh_auto_configure: preconfigure
|
||||
-DCLANG_BUILD_EXAMPLES=OFF \
|
||||
-DBOOTSTRAP_CMAKE_CXX_FLAGS='$(BOOTSTRAP_CXXFLAGS_EXTRA)' \
|
||||
-DBOOTSTRAP_CMAKE_C_FLAGS='$(BOOTSTRAP_CFLAGS_EXTRA)' \
|
||||
-DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;LLVM_LINK_LLVM_DYLIB;LLVM_INSTALL_UTILS;LLVM_VERSION_SUFFIX;LLVM_ENABLE_SPHINX;SPHINX_WARNINGS_AS_ERRORS;LLVM_BUILD_LLVM_DYLIB;LLVM_ENABLE_RTTI;LLVM_ENABLE_FFI;LIBCLANG_LIBRARY_VERSION;ENABLE_LINKER_BUILD_ID;POLLY_BUNDLED_JSONCPP;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;LLVM_USE_PERF;LLVM_ENABLE_ASSERTIONS;LLVM_BINUTILS_INCDIR;LLVM_HOST_TRIPLE;;LLVM_COMPILER_CHECKED;COMPILER_RT_BUILD_BUILTINS;LIBOMP_LIBFLAGS;CMAKE_SHARED_LINKER_FLAGS;PYTHON_EXECUTABLE"
|
||||
-DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;LLVM_LINK_LLVM_DYLIB;LLVM_INSTALL_UTILS;LLVM_VERSION_SUFFIX;LLVM_ENABLE_SPHINX;SPHINX_WARNINGS_AS_ERRORS;LLVM_BUILD_LLVM_DYLIB;LLVM_ENABLE_RTTI;LLVM_ENABLE_FFI;LIBCLANG_LIBRARY_VERSION;ENABLE_LINKER_BUILD_ID;POLLY_BUNDLED_JSONCPP;LLVM_EXPERIMENTAL_TARGETS_TO_BUILD;LLVM_USE_PERF;LLVM_ENABLE_ASSERTIONS;LLVM_BINUTILS_INCDIR;LLVM_HOST_TRIPLE;LLVM_COMPILER_CHECKED;COMPILER_RT_BUILD_BUILTINS;LIBOMP_LIBFLAGS;CMAKE_SHARED_LINKER_FLAGS;PYTHON_EXECUTABLE;LLVM_ENABLE_Z3_SOLVER"
|
||||
|
||||
|
||||
# make
|
||||
@ -600,7 +590,7 @@ endif
|
||||
cp $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/README.txt $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/share/README.txt
|
||||
|
||||
# idem for the lldb python binding
|
||||
mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python2.7/site-packages/lldb/
|
||||
mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python2.7/dist-packages/lldb/
|
||||
|
||||
# Remove things that CMake install but which aren't packaged yet,
|
||||
# or are packaged from the source or build tree.
|
||||
@ -664,7 +654,7 @@ endif
|
||||
sed -i 's|.*_IMPORT_CHECK_FILES_FOR_.*/bin/.*)|#&|' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/clang/ClangTargets-*.cmake
|
||||
|
||||
# Managed in python-lldb-X.Y.links.in
|
||||
rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/site-packages/lldb/_lldb.so
|
||||
rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/*-packages/lldb/_lldb.so
|
||||
|
||||
# Manage the polly files. Sometimes, we build them. Sometimes not.
|
||||
if test "$(POLLY_ENABLE)" = yes; then \
|
||||
@ -769,7 +759,7 @@ override_dh_installdeb:
|
||||
# Managed by the package
|
||||
dh_installdeb -a
|
||||
|
||||
rm -f $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/site-packages/lldb/__init__.pyc $(CURDIR)/debian/python-lldb-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/site-packages/lldb/__init__.pyc
|
||||
rm -f $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/*-packages/lldb/__init__.pyc $(CURDIR)/debian/python-lldb-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/*-packages/lldb/__init__.pyc
|
||||
rm -f $(CURDIR)/debian/clang-$(LLVM_VERSION)-examples/usr/share/doc/clang-$(LLVM_VERSION)-examples/examples/*Make*
|
||||
|
||||
# Remove auto generated python pyc
|
||||
@ -813,7 +803,7 @@ endif
|
||||
ifeq (,$(filter $(DEB_HOST_ARCH), $(LLDB_DISABLE_ARCHS) armhf armel))
|
||||
ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS)))
|
||||
# Create a symlink to run the testsuite: see https://bugs.archlinux.org/task/50759
|
||||
cd $(CURDIR)/$(TARGET_BUILD)/lib/python*/site-packages/; \
|
||||
cd $(CURDIR)/$(TARGET_BUILD)/lib/python*/*-packages/; \
|
||||
if test ! -e _lldb.so; then \
|
||||
ln -s lldb/_lldb.so; \
|
||||
fi
|
||||
@ -821,7 +811,7 @@ ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS)))
|
||||
LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/$(TARGET_BUILD)/lib/ $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-lldb || true; \
|
||||
fi
|
||||
# remove the workaround
|
||||
rm $(CURDIR)/$(TARGET_BUILD)/lib/python*/site-packages/_lldb.so
|
||||
rm $(CURDIR)/$(TARGET_BUILD)/lib/python*/*-packages/_lldb.so
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -831,7 +821,7 @@ ifeq (${POLLY_ENABLE},yes)
|
||||
endif
|
||||
|
||||
# Managed by debian build system
|
||||
rm -f $(CURDIR)/$(TARGET_BUILD)/lib/python*/site-packages/lldb/_lldb.so
|
||||
rm -f $(CURDIR)/$(TARGET_BUILD)/lib/python*/*-packages/lldb/_lldb.so
|
||||
|
||||
# The compression of the code coverage report is done in the
|
||||
# hook B21GetCoverageResults on the server
|
||||
|
1
debian/tests/cmake-test
vendored
1
debian/tests/cmake-test
vendored
@ -17,6 +17,7 @@ fi
|
||||
cd "$ADTTMP"
|
||||
cat <<EOF > CMakeLists.txt
|
||||
cmake_minimum_required(VERSION 2.6.2)
|
||||
project(cmake-test)
|
||||
find_package(LLVM 10.0.0 REQUIRED
|
||||
COMPONENTS
|
||||
Analysis
|
||||
|
2
debian/watch
vendored
2
debian/watch
vendored
@ -1,3 +1,3 @@
|
||||
version=3
|
||||
http://llvm.org/releases/download.html .*/llvm-([\d\.\-]+).src.tar.xz
|
||||
https://llvm.org/releases/download.html .*/llvm-([\d\.\-]+).src.tar.xz
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user