From 70a4bd3129e331a0aa7c7b51264602705eadf0db Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 7 Aug 2016 13:22:46 +0000 Subject: [PATCH 01/14] Use filter into of findstring in the gold usage. Thanks Doko for the suggestion --- debian/changelog | 2 ++ debian/rules | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6e67bbbd..01d10371 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium testsuite * Disable lldb on ppc64 * libfuzzer depends on the same version of clang (Closes: #833564) + * Use filter into of findstring in the gold usage. Thanks Doko for the + suggestion -- Sylvestre Ledru Sun, 07 Aug 2016 14:10:09 +0200 diff --git a/debian/rules b/debian/rules index 27ed25b9..e45e18cc 100755 --- a/debian/rules +++ b/debian/rules @@ -69,7 +69,7 @@ endif BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0) -ifneq (,$(findstring $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) +ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # -fused-ld=gold enables the gold linker (but is not supported by all archs / distro) LDFLAGS_EXTRA += -fuse-ld=gold CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold From b71c1abcae508e675d24f041459a8824eee2e81b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 7 Aug 2016 14:11:21 +0000 Subject: [PATCH 02/14] amd64 llvm testsuite is green, bring back the failure in case of error --- debian/changelog | 6 ++++++ debian/rules | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 01d10371..9856201b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-3.8 (1:3.8.1-9) UNRELEASED; urgency=medium + + * amd64 llvm testsuite is green, bring back the failure in case of error + + -- Sylvestre Ledru Sun, 07 Aug 2016 16:03:32 +0200 + llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium * Disable the usage of ld gold on powerpc (Closes: #833583) diff --git a/debian/rules b/debian/rules index e45e18cc..c8feec10 100755 --- a/debian/rules +++ b/debian/rules @@ -478,7 +478,7 @@ override_dh_installdeb: ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS))) # List of the archs we know we have 100 % tests working -ARCH_LLVM_TEST_OK := i386 +ARCH_LLVM_TEST_OK := i386 amd64 override_dh_auto_test: From 89d37cea54d36bfb938bfd317ad6260ac215b876 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 7 Aug 2016 14:13:35 +0000 Subject: [PATCH 03/14] amd64 llvm testsuite is green, bring back the failure in case of error --- debian/changelog | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9856201b..c6d0e824 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,3 @@ -llvm-toolchain-3.8 (1:3.8.1-9) UNRELEASED; urgency=medium - - * amd64 llvm testsuite is green, bring back the failure in case of error - - -- Sylvestre Ledru Sun, 07 Aug 2016 16:03:32 +0200 - llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium * Disable the usage of ld gold on powerpc (Closes: #833583) @@ -13,6 +7,7 @@ llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium * libfuzzer depends on the same version of clang (Closes: #833564) * Use filter into of findstring in the gold usage. Thanks Doko for the suggestion + * amd64 llvm testsuite is green, bring back the failure in case of error -- Sylvestre Ledru Sun, 07 Aug 2016 14:10:09 +0200 From db87b5390ecee32b0b8e625a1f75f0d184df4daf Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 Aug 2016 08:47:28 +0000 Subject: [PATCH 04/14] * Generate manpages for lli, lldb-mi & git-clang-format * Fix some lintian overrides --- debian/changelog | 7 +++++++ debian/clang-X.Y.manpages.in | 2 +- debian/clang-format-X.Y.manpages.in | 1 + debian/libclang1-X.Y.lintian-overrides.in | 2 +- debian/liblldb-X.Y.lintian-overrides.in | 3 ++- debian/lldb-X.Y.manpages.in | 2 +- debian/llvm-X.Y-runtime.manpages.in | 3 +-- debian/rules | 2 +- 8 files changed, 15 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index c6d0e824..6a6f931c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-3.8 (1:3.8.1-9) unstable; urgency=medium + + * Generate manpages for lli, lldb-mi & git-clang-format + * Fix some lintian overrides + + -- + llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium * Disable the usage of ld gold on powerpc (Closes: #833583) diff --git a/debian/clang-X.Y.manpages.in b/debian/clang-X.Y.manpages.in index 7be800ef..737fbd47 100644 --- a/debian/clang-X.Y.manpages.in +++ b/debian/clang-X.Y.manpages.in @@ -1,4 +1,4 @@ -clang/docs/_build/man/clang-@LLVM_VERSION@.1 +debian/man/clang-@LLVM_VERSION@.1 clang/tools/scan-build/man/scan-build-@LLVM_VERSION@.1 debian/man/clang-check-@LLVM_VERSION@.1 debian/man/scan-view-@LLVM_VERSION@.1 diff --git a/debian/clang-format-X.Y.manpages.in b/debian/clang-format-X.Y.manpages.in index 486b909d..27cf9348 100644 --- a/debian/clang-format-X.Y.manpages.in +++ b/debian/clang-format-X.Y.manpages.in @@ -1,2 +1,3 @@ debian/man/clang-format-diff-@LLVM_VERSION@.1 debian/man/clang-format-@LLVM_VERSION@.1 +debian/man/git-clang-format-@LLVM_VERSION@.1 diff --git a/debian/libclang1-X.Y.lintian-overrides.in b/debian/libclang1-X.Y.lintian-overrides.in index aa7ef217..9fc47a74 100644 --- a/debian/libclang1-X.Y.lintian-overrides.in +++ b/debian/libclang1-X.Y.lintian-overrides.in @@ -1,5 +1,5 @@ # I know and I am not planning to change that yet. -libclang1-@LLVM_VERSION@: package-name-doesnt-match-sonames libclang1-@LLVM_VERSION@ +libclang1-@LLVM_VERSION@: package-name-doesnt-match-sonames libclang1-@LLVM_VERSION@-1 # Provided as transition libclang1-@LLVM_VERSION@: dev-pkg-without-shlib-symlink usr/lib/*/libclang-@LLVM_VERSION@.so.1 usr/lib/*/libclang.so libclang1-@LLVM_VERSION@: ldconfig-symlink-missing-for-shlib usr/lib/*/libclang-LLVM_VERSION@.so usr/lib/*/libclang-LLVM_VERSION@.so.1 libclang-LLVM_VERSION@.so diff --git a/debian/liblldb-X.Y.lintian-overrides.in b/debian/liblldb-X.Y.lintian-overrides.in index b045ee27..180aec35 100644 --- a/debian/liblldb-X.Y.lintian-overrides.in +++ b/debian/liblldb-X.Y.lintian-overrides.in @@ -1,4 +1,5 @@ # That is normal. The lib is not (yet?) shipped as a new package -liblldb-@LLVM_VERSION@: package-name-doesnt-match-sonames liblldb +liblldb-@LLVM_VERSION@: package-name-doesnt-match-sonames liblldb-@LLVM_VERSION@-1 # For now, override this warning. We might create a -dev at some point liblldb-@LLVM_VERSION@: non-dev-pkg-with-shlib-symlink usr/lib/*/liblldb.so.1 usr/lib/*/liblldb.so +liblldb-@LLVM_VERSION@: non-dev-pkg-with-shlib-symlink usr/lib/*/liblldb-@LLVM_VERSION@.so.1 usr/lib/*/liblldb-@LLVM_VERSION@.so diff --git a/debian/lldb-X.Y.manpages.in b/debian/lldb-X.Y.manpages.in index 22dbbbcb..36a62aea 100644 --- a/debian/lldb-X.Y.manpages.in +++ b/debian/lldb-X.Y.manpages.in @@ -1,2 +1,2 @@ debian/man/lldb-@LLVM_VERSION@.1 - +debian/man/lldb-mi-@LLVM_VERSION@.1 diff --git a/debian/llvm-X.Y-runtime.manpages.in b/debian/llvm-X.Y-runtime.manpages.in index 0f0bf921..839952d0 100644 --- a/debian/llvm-X.Y-runtime.manpages.in +++ b/debian/llvm-X.Y-runtime.manpages.in @@ -1,2 +1 @@ -docs/_build/man/lli* - +debian/man/lli* diff --git a/debian/rules b/debian/rules index c8feec10..634def5d 100755 --- a/debian/rules +++ b/debian/rules @@ -297,7 +297,7 @@ build_doc: help2man --version-string=$(LLVM_VERSION) clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 help2man --version-string=$(LLVM_VERSION) clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 - CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb clang-format clang clang-tblgen clang-check clang-tidy clang-apply-replacements pp-trace sancov"; \ + CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-tblgen clang-check clang-tidy clang-apply-replacements git-clang-format pp-trace sancov lli"; \ for f in $$CMDS; do \ echo "Generating manpage of $$f"; \ LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --no-discard-stderr --version-string=$(LLVM_VERSION) $(TARGET_BUILD)/$(BUILD_DIR)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ From ba6bfc46ea4e0f9e3b478e5dbb59901e76f595dc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 Aug 2016 08:54:50 +0000 Subject: [PATCH 05/14] use the manpage from the doc generation --- debian/clang-X.Y.manpages.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/clang-X.Y.manpages.in b/debian/clang-X.Y.manpages.in index 737fbd47..7be800ef 100644 --- a/debian/clang-X.Y.manpages.in +++ b/debian/clang-X.Y.manpages.in @@ -1,4 +1,4 @@ -debian/man/clang-@LLVM_VERSION@.1 +clang/docs/_build/man/clang-@LLVM_VERSION@.1 clang/tools/scan-build/man/scan-build-@LLVM_VERSION@.1 debian/man/clang-check-@LLVM_VERSION@.1 debian/man/scan-view-@LLVM_VERSION@.1 From 20d68b12264094d3c853e691dff377ca6343e7c5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 Aug 2016 09:03:25 +0000 Subject: [PATCH 06/14] remove old stuff --- debian/man/clang-format-diff-3.4.1 | 30 ---- debian/man/cpp11-migrate-3.4.1 | 256 ----------------------------- 2 files changed, 286 deletions(-) delete mode 100644 debian/man/clang-format-diff-3.4.1 delete mode 100644 debian/man/cpp11-migrate-3.4.1 diff --git a/debian/man/clang-format-diff-3.4.1 b/debian/man/clang-format-diff-3.4.1 deleted file mode 100644 index 75a56e9c..00000000 --- a/debian/man/clang-format-diff-3.4.1 +++ /dev/null @@ -1,30 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. -.TH CLANG-FORMAT-DIFF-3.3 "1" "June 2013" "clang-format-diff-3.3 3.3" "User Commands" -.SH NAME -clang-format-diff-3.3 \- manual page for clang-format-diff-3.3 3.3 -.SH DESCRIPTION -usage: clang\-format\-diff\-3.3 [\-h] [\-p P] [\-style STYLE] -.PP -Reformat changed lines in diff -.SS "optional arguments:" -.TP -\fB\-h\fR, \fB\-\-help\fR -show this help message and exit -.TP -\fB\-p\fR P -strip the smallest prefix containing P slashes -.TP -\fB\-style\fR STYLE -formatting style to apply (LLVM, Google, Chromium) -.SH "SEE ALSO" -The full documentation for -.B clang-format-diff-3.3 -is maintained as a Texinfo manual. If the -.B info -and -.B clang-format-diff-3.3 -programs are properly installed at your site, the command -.IP -.B info clang-format-diff-3.3 -.PP -should give you access to the complete manual. diff --git a/debian/man/cpp11-migrate-3.4.1 b/debian/man/cpp11-migrate-3.4.1 deleted file mode 100644 index cb94e14f..00000000 --- a/debian/man/cpp11-migrate-3.4.1 +++ /dev/null @@ -1,256 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.41.2. -.TH LLVM "1" "June 2013" "LLVM (http://llvm.org/):" "User Commands" -.SH NAME -LLVM \- manual page for LLVM (http://llvm.org/): -.SH DESCRIPTION -USAGE: cpp11\-migrate [options] [... ] -.SS "OPTIONS:" -.HP -\fB\-add\-override\fR \- Make use of override specifier where possible -.HP -\fB\-asm\-verbose\fR \- Add comments to directives. -.HP -\fB\-bounds\-checking\-single\-trap\fR \- Use one trap block per function -.HP -\fB\-cppfname=\fR \- Specify the name of the generated function -.HP -\fB\-cppfor=\fR \- Specify the name of the thing to generate -.HP -\fB\-cppgen\fR \- Choose what kind of output to generate -.TP -=program -\- Generate a complete program -.TP -=module -\- Generate a module definition -.TP -=contents -\- Generate contents of a module -.TP -=function -\- Generate a function definition -.TP -=functions -\- Generate all function definitions -.TP -=inline -\- Generate an inline function -.TP -=variable -\- Generate a variable definition -.TP -=type -\- Generate a type definition -.HP -\fB\-disable\-spill\-fusing\fR \- Disable fusing of spill code into instructions -.IP -Choose driver interface: -.HP -\fB\-drvnvcl\fR \- Nvidia OpenCL driver -.HP -\fB\-drvcuda\fR \- Nvidia CUDA driver -.HP -\fB\-drvtest\fR \- Plain Test -.HP -\fB\-enable\-correct\-eh\-support\fR \- Make the \fB\-lowerinvoke\fR pass insert expensive, but correct, EH code -.HP -\fB\-enable\-load\-pre\fR \- -.HP -\fB\-enable\-objc\-arc\-opts\fR \- enable/disable all ARC Optimizations -.HP -\fB\-enable\-tbaa\fR \- -.HP -\fB\-fatal\-assembler\-warnings\fR \- Consider warnings as error -.HP -\fB\-fdata\-sections\fR \- Emit data into separate sections -.HP -\fB\-ffunction\-sections\fR \- Emit functions into separate sections -.HP -\fB\-final\-syntax\-check\fR \- Check for correct syntax after applying transformations -.HP -\fB\-help\fR \- Display available options (\fB\-help\-hidden\fR for more) -.HP -\fB\-internalize\-public\-api\-file=\fR \- A file containing list of symbol names to preserve -.HP -\fB\-internalize\-public\-api\-list=\fR \- A list of symbol names to preserve -.HP -\fB\-join\-liveintervals\fR \- Coalesce copies (default=true) -.HP -\fB\-limit\-float\-precision=\fR \- Generate low\-precision inline sequences for some float libcalls -.HP -\fB\-loop\-convert\fR \- Make use of range\-based for loops where possible -.HP -\fB\-mc\-x86\-disable\-arith\-relaxation\fR \- Disable relaxation of arithmetic instruction for X86 -.HP -\fB\-mips16\-hard\-float\fR \- MIPS: mips16 hard float enable. -.HP -\fB\-msp430\-hwmult\-mode\fR \- Hardware multiplier use mode -.TP -=no -\- Do not use hardware multiplier -.TP -=interrupts -\- Assume hardware multiplier can be used inside interrupts -.TP -=use -\- Assume hardware multiplier cannot be used inside interrupts -.HP -\fB\-nvptx\-emit\-line\-numbers\fR \- NVPTX Specific: Emit Line numbers even without \fB\-G\fR -.HP -\fB\-nvptx\-emit\-src\fR \- NVPTX Specific: Emit source line in ptx file -.TP -\fB\-nvptx\-fma\-level=\fR \- NVPTX Specific: FMA contraction (0: don't do it 1: do it -2: do it aggressively -.HP -\fB\-nvptx\-mad\-enable\fR \- NVPTX Specific: Enable generating FMAD instructions -.HP -\fB\-nvptx\-prec\-divf32=\fR \- NVPTX Specifies: 0 use div.approx, 1 use div.full, 2 use IEEE Compliant F32 div.rnd if avaiable. -.HP -\fB\-nvptx\-sched4reg\fR \- NVPTX Specific: schedule for register pressue -.HP -\fB\-nvvm\-reflect\-enable\fR \- NVVM reflection, enabled by default -.HP -\fB\-nvvm\-reflect\-list=\fR> \- A list of string=num assignments -.HP -\fB\-p=\fR \- Build path -.HP -\fB\-pre\-RA\-sched\fR \- Instruction schedulers available (before register allocation): -.TP -=vliw\-td -\- VLIW scheduler -.TP -=list\-ilp -\- Bottom\-up register pressure aware list scheduling which tries to balance ILP and register pressure -.TP -=list\-hybrid -\- Bottom\-up register pressure aware list scheduling which tries to balance latency and register pressure -.TP -=source -\- Similar to list\-burr but schedules in source order when possible -.TP -=list\-burr -\- Bottom\-up register reduction list scheduling -.TP -=linearize -\- Linearize DAG, no scheduling -.TP -=fast -\- Fast suboptimal list scheduling -.TP -=default -\- Best scheduler for the target -.HP -\fB\-print\-after\-all\fR \- Print IR after each pass -.HP -\fB\-print\-before\-all\fR \- Print IR before each pass -.HP -\fB\-print\-machineinstrs=\fR \- Print machine instrs -.HP -\fB\-profile\-estimator\-loop\-weight=\fR \- Number of loop executions used for profile\-estimator -.HP -\fB\-profile\-file=\fR \- Profile file loaded by \fB\-profile\-metadata\-loader\fR -.HP -\fB\-profile\-info\-file=\fR \- Profile file loaded by \fB\-profile\-loader\fR -.HP -\fB\-profile\-verifier\-noassert\fR \- Disable assertions -.HP -\fB\-regalloc\fR \- Register allocator to use -.TP -=default -\- pick register allocator based on \fB\-O\fR option -.TP -=basic -\- basic register allocator -.TP -=fast -\- fast register allocator -.TP -=greedy -\- greedy register allocator -.TP -=pbqp -\- PBQP register allocator -.HP -\fB\-risk\fR \- Select a maximum risk level: -.TP -=safe -\- Only safe transformations -.TP -=reasonable -\- Enable transformations that might change semantics (default) -.TP -=risky -\- Enable transformations that are likely to change semantics -.HP -\fB\-shrink\-wrap\fR \- Shrink wrap callee\-saved register spills/restores -.HP -\fB\-spiller\fR \- Spiller to use: (default: standard) -.TP -=trivial -\- trivial spiller -.TP -=inline -\- inline spiller -.HP -\fB\-stats\fR \- Enable statistics output from program (available with Asserts) -.HP -\fB\-struct\-path\-tbaa\fR \- -.HP -\fB\-summary\fR \- Print transform summary -.HP -\fB\-time\-passes\fR \- Time each pass, printing elapsed time for each on exit -.HP -\fB\-use\-auto\fR \- Use of 'auto' type specifier -.HP -\fB\-use\-nullptr\fR \- Make use of nullptr keyword where possible -.HP -\fB\-user\-null\-macros=\fR \- Comma\-separated list of user\-defined macro names that behave like NULL -.HP -\fB\-vectorize\-loops\fR \- Run the Loop vectorization passes -.HP -\fB\-vectorize\-slp\fR \- Run the SLP vectorization passes -.HP -\fB\-vectorize\-slp\-aggressive\fR \- Run the BB vectorization passes -.HP -\fB\-verify\-dom\-info\fR \- Verify dominator info (time consuming) -.HP -\fB\-verify\-loop\-info\fR \- Verify loop info (time consuming) -.HP -\fB\-verify\-regalloc\fR \- Verify during register allocation -.HP -\fB\-verify\-region\-info\fR \- Verify region info (time consuming) -.HP -\fB\-verify\-scev\fR \- Verify ScalarEvolution's backedge taken counts (slow) -.HP -\fB\-version\fR \- Display the version of this program -.HP -\fB\-x86\-asm\-syntax\fR \- Choose style of code to emit from X86 backend: -.TP -=att -\- Emit AT&T\-style assembly -.TP -=intel -\- Emit Intel\-style assembly -.HP -\fB\-x86\-early\-ifcvt\fR \- Enable early if\-conversion on X86 -.HP -\fB\-x86\-use\-vzeroupper\fR \- Minimize AVX to SSE transition penalty -.IP -LLVM version 3.3 -.IP -Optimized build. -Built May 7 2013 (21:07:59). -Default target: x86_64\-pc\-linux\-gnu -Host CPU: corei7\-avx -.SH "SEE ALSO" -The full documentation for -.B LLVM -is maintained as a Texinfo manual. If the -.B info -and -.B LLVM -programs are properly installed at your site, the command -.IP -.B info LLVM -.PP -should give you access to the complete manual. From c592356bf79f9b760588202da0479790359c8a59 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 Aug 2016 15:03:56 +0000 Subject: [PATCH 07/14] Improve the repack script to use a cache --- debian/orig-tar.sh | 57 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh index 075cae4e..63c9b190 100755 --- a/debian/orig-tar.sh +++ b/debian/orig-tar.sh @@ -59,7 +59,39 @@ get_higher_revision() { echo $REVISION_MAX } +SVN_ARCHIVES=svn-archives +checkout_sources() { + PROJECT=$1 + URL=$2 + TARGET=$3 + BRANCH=$4 + if test -n "$BRANCH"; then + REVISION=$5 + fi + echo "$PROJECT / $URL / $BRANCH / $TARGET / $REVISION" + + cd $SVN_ARCHIVES/ + DEST=$PROJECT-$BRANCH + if test -d $DEST; then + cd $DEST + if test -n "$BRANCH"; then + svn up + else + svn up -r $REVISION + fi + cd .. + else + if test -n "$BRANCH"; then + svn co $URL $DEST + else + svn co -r $REVISION $URL $DIST + fi + fi + rm -rf ../$TARGET + rsync -r --exclude=.svn $DEST/ ../$TARGET + cd .. +} if test -n "$BRANCH"; then REVISION=$(get_higher_revision) @@ -84,42 +116,55 @@ else fi fi +mkdir -p $SVN_ARCHIVES + # LLVM LLVM_TARGET=$FULL_VERSION -$SVN_CMD $(get_svn_url llvm $BRANCH $TAG) $LLVM_TARGET +checkout_sources llvm $(get_svn_url llvm $BRANCH $TAG) $LLVM_TARGET "$BRANCH" $REVISION tar jcvf $FULL_VERSION.orig.tar.bz2 $LLVM_TARGET rm -rf $LLVM_TARGET # Clang CLANG_TARGET=clang_$VERSION -$SVN_CMD $(get_svn_url cfe $BRANCH $TAG) $CLANG_TARGET +checkout_sources clang $(get_svn_url cfe $BRANCH $TAG) $CLANG_TARGET "$BRANCH" $REVISION tar jcvf $FULL_VERSION.orig-clang.tar.bz2 $CLANG_TARGET rm -rf $CLANG_TARGET # Clang extra CLANG_TARGET=clang-tools-extra_$VERSION -$SVN_CMD $(get_svn_url clang-tools-extra $BRANCH $TAG) $CLANG_TARGET +checkout_sources clang-tools-extra $(get_svn_url clang-tools-extra $BRANCH $TAG) $CLANG_TARGET "$BRANCH" $REVISION tar jcvf $FULL_VERSION.orig-clang-tools-extra.tar.bz2 $CLANG_TARGET rm -rf $CLANG_TARGET # Compiler-rt COMPILER_RT_TARGET=compiler-rt_$VERSION -$SVN_CMD $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET +checkout_sources compiler-rt $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET "$BRANCH" $REVISION +#$SVN_CMD $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET tar jcvf $FULL_VERSION.orig-compiler-rt.tar.bz2 $COMPILER_RT_TARGET rm -rf $COMPILER_RT_TARGET # Polly POLLY_TARGET=polly_$VERSION -$SVN_CMD $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET +checkout_sources polly $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET "$BRANCH" $REVISION +#$SVN_CMD $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET rm -rf $POLLY_TARGET/www $POLLY_TARGET/autoconf/config.sub $POLLY_TARGET/autoconf/config.guess tar jcvf $FULL_VERSION.orig-polly.tar.bz2 $POLLY_TARGET rm -rf $POLLY_TARGET +# # LLD +# LLD_TARGET=lld_$VERSION +# checkout_sources lld $(get_svn_url lld $BRANCH $TAG) $LLD_TARGET "$BRANCH" $REVISION +# #$SVN_CMD $(get_svn_url lld $BRANCH $TAG) $LLD_TARGET +# rm -rf $LLD_TARGET/www/ +# tar jcvf $FULL_VERSION.orig-lld.tar.bz2 $LLD_TARGET +# rm -rf $LLD_TARGET + # LLDB LLDB_TARGET=lldb_$VERSION -$SVN_CMD $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET +checkout_sources lldb $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET "$BRANCH" $REVISION +#$SVN_CMD $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET rm -rf $LLDB_TARGET/www/ tar jcvf $FULL_VERSION.orig-lldb.tar.bz2 $LLDB_TARGET rm -rf $LLDB_TARGET From c5ab781e109f2ad529f5863ac2ab5c1268f403dc Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 8 Aug 2016 16:50:18 +0000 Subject: [PATCH 08/14] Bring back the lto (gone with the cmake migration) (Closes: #819333) (upstream: #27223) --- debian/changelog | 4 +++- debian/rules | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6a6f931c..6bada720 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ llvm-toolchain-3.8 (1:3.8.1-9) unstable; urgency=medium * Generate manpages for lli, lldb-mi & git-clang-format * Fix some lintian overrides + * Bring back the lto (gone with the cmake migration) + (Closes: #819333) (upstream: #27223) - -- + -- Sylvestre Ledru Mon, 08 Aug 2016 18:50:13 +0200 llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium diff --git a/debian/rules b/debian/rules index 634def5d..e03e3942 100755 --- a/debian/rules +++ b/debian/rules @@ -73,6 +73,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # -fused-ld=gold enables the gold linker (but is not supported by all archs / distro) LDFLAGS_EXTRA += -fuse-ld=gold CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold + CMAKE_EXTRA += -DLLVM_BINUTILS_INCDIR=/usr/include/ endif endif From cfc2747c116473c59dbf220d9dbf9cec46ba480c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 9 Aug 2016 08:48:31 +0000 Subject: [PATCH 09/14] fix a typo in the repack script --- debian/orig-tar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/orig-tar.sh b/debian/orig-tar.sh index 63c9b190..d79ec091 100755 --- a/debian/orig-tar.sh +++ b/debian/orig-tar.sh @@ -85,7 +85,7 @@ checkout_sources() { if test -n "$BRANCH"; then svn co $URL $DEST else - svn co -r $REVISION $URL $DIST + svn co -r $REVISION $URL $DEST fi fi rm -rf ../$TARGET From 170221c75ae246fe7705c77d12109c1a64a2b1bf Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 12 Aug 2016 16:28:21 +0000 Subject: [PATCH 10/14] Add symlink from ./build to ../share and ../lib etc Thanks to Ximin Luo for the patch (Closes: #834144) --- debian/changelog | 2 ++ debian/llvm-X.Y-dev.links.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index 6bada720..76056e43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ llvm-toolchain-3.8 (1:3.8.1-9) unstable; urgency=medium * Fix some lintian overrides * Bring back the lto (gone with the cmake migration) (Closes: #819333) (upstream: #27223) + * Add symlink from ./build to ../share and ../lib etc + Thanks to Ximin Luo for the patch (Closes: #834144) -- Sylvestre Ledru Mon, 08 Aug 2016 18:50:13 +0200 diff --git a/debian/llvm-X.Y-dev.links.in b/debian/llvm-X.Y-dev.links.in index 7a1bea20..fecd9494 100644 --- a/debian/llvm-X.Y-dev.links.in +++ b/debian/llvm-X.Y-dev.links.in @@ -10,6 +10,8 @@ usr/include/llvm-c-@LLVM_VERSION@/llvm-c usr/lib/llvm-@LLVM_VERSION@/build/inclu usr/include/llvm-@LLVM_VERSION@/llvm usr/lib/llvm-@LLVM_VERSION@/build/include/llvm usr/lib/llvm-@LLVM_VERSION@/include/ usr/lib/llvm-@LLVM_VERSION@/build/include +usr/lib/llvm-@LLVM_VERSION@/lib/ usr/lib/llvm-@LLVM_VERSION@/build/lib +usr/lib/llvm-@LLVM_VERSION@/share/ usr/lib/llvm-@LLVM_VERSION@/build/share usr/lib/llvm-@LLVM_VERSION@/ usr/lib/llvm-@LLVM_VERSION@/build/Release usr/lib/llvm-@LLVM_VERSION@/ usr/lib/llvm-@LLVM_VERSION@/build/Debug+Asserts From e9c0774ac3890e20588b69dac5fe9319a9bccd6b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 16 Aug 2016 11:28:35 +0000 Subject: [PATCH 11/14] Disable lldb on mips64el (same as in 3.9) --- debian/changelog | 1 + debian/control | 18 +++++++++--------- debian/rules | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 76056e43..669e3a5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ llvm-toolchain-3.8 (1:3.8.1-9) unstable; urgency=medium (Closes: #819333) (upstream: #27223) * Add symlink from ./build to ../share and ../lib etc Thanks to Ximin Luo for the patch (Closes: #834144) + * Disable lldb on mips64el (same as in 3.9) -- Sylvestre Ledru Mon, 08 Aug 2016 18:50:13 +0200 diff --git a/debian/control b/debian/control index 4cf4124b..7ad67cbf 100644 --- a/debian/control +++ b/debian/control @@ -393,8 +393,8 @@ Description: Modular compiler and toolchain technologies, examples # ------------- lldb ------------- Package: lldb-3.8 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel mips64el -# ia64 hurd powerpc ppc64el sparc64 ppc64 have been removed +Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel +# ia64 hurd powerpc ppc64el sparc64 ppc64 mips64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.8 (= ${binary:Version}), llvm-3.8-dev Suggests: python-lldb-3.8 Conflicts: lldb-3.4, lldb-3.5 @@ -405,8 +405,8 @@ Description: Next generation, high-performance debugger Project, such as the Clang expression parser and LLVM disassembler. Package: liblldb-3.8 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel mips64el -# ia64 hurd powerpc ppc64el sparc64 ppc64 have been removed +Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel +# ia64 hurd powerpc ppc64el sparc64 ppc64 mips64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.8 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: libs @@ -420,8 +420,8 @@ Description: Next generation, high-performance debugger, library This package contains the LLDB runtime library. Package: liblldb-3.8-dbg -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel mips64el -# ia64 hurd ppc64el alpha s390x powerpc sparc64 ppc64 have been removed +Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel +# ia64 hurd ppc64el alpha s390x powerpc sparc64 ppc64 mips64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-3.8 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: debug @@ -436,7 +436,7 @@ Description: Next generation, high-performance debugger, debugging libraries Package: python-lldb-3.8 Section: python -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel mips64el +Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-3.8-dev, python, python-six Conflicts: python-lldb-3.4, python-lldb-3.5, python-lldb-3.6, python-lldb-3.7 Pre-Depends: ${misc:Pre-Depends} @@ -450,8 +450,8 @@ Description: Next generation, high-performance debugger, python lib Package: liblldb-3.8-dev Section: libdevel -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel mips64el -# ia64 hurd powerpc ppc64el sparc64 ppc64 have been removed +Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel +# ia64 hurd powerpc ppc64el sparc64 ppc64 mips64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, lldb-3.8 (= ${binary:Version}) Replaces: lldb-3.8-dev (<= 1:3.8~svn215195-2) Breaks: lldb-3.8-dev (<< 1:3.8~svn215195-2) diff --git a/debian/rules b/debian/rules index e03e3942..2776af52 100755 --- a/debian/rules +++ b/debian/rules @@ -124,7 +124,7 @@ endif LLDB_ENABLE=yes -LLDB_DISABLE_ARCHS := arm64 hurd-i386 ia64 ppc64el powerpc s390x sparc64 ppc64 +LLDB_DISABLE_ARCHS := arm64 hurd-i386 ia64 ppc64el powerpc s390x sparc64 ppc64 mips64el # hurd has threading issues ifeq (,$(filter-out $(LLDB_DISABLE_ARCHS), $(DEB_HOST_ARCH))) # Disable LLDB for this arch. From 96bfeba564ae2dcb5cf4e6cf162b4ed80ac0471f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 17 Aug 2016 13:04:15 +0000 Subject: [PATCH 12/14] remove autogenerated files --- debian/llvm-X.Y-runtime.links.in | 1 - debian/llvm-X.Y.links.in | 1 - 2 files changed, 2 deletions(-) delete mode 100644 debian/llvm-X.Y-runtime.links.in delete mode 100644 debian/llvm-X.Y.links.in diff --git a/debian/llvm-X.Y-runtime.links.in b/debian/llvm-X.Y-runtime.links.in deleted file mode 100644 index 655ca2dc..00000000 --- a/debian/llvm-X.Y-runtime.links.in +++ /dev/null @@ -1 +0,0 @@ -# AUTOGENERATED in debian/rules.d/binary.mk. diff --git a/debian/llvm-X.Y.links.in b/debian/llvm-X.Y.links.in deleted file mode 100644 index 655ca2dc..00000000 --- a/debian/llvm-X.Y.links.in +++ /dev/null @@ -1 +0,0 @@ -# AUTOGENERATED in debian/rules.d/binary.mk. From ecb4eae906e0771ee8ff525216cdf02ffe1f7c2b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 27 Aug 2016 15:37:02 +0000 Subject: [PATCH 13/14] Fix the usage of jsoncpp in polly. Thanks to James Clarke for the patch (Closes: #835606) --- debian/changelog | 7 +++++ debian/patches/use-deb-json.diff | 52 ++++++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 669e3a5b..ab4febfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-3.8 (1:3.8.1-10) UNRELEASED; urgency=medium + + * Fix the usage of jsoncpp in polly. Thanks to James Clarke for the patch + (Closes: #835606) + + -- Sylvestre Ledru Sat, 27 Aug 2016 17:36:06 +0200 + llvm-toolchain-3.8 (1:3.8.1-9) unstable; urgency=medium * Generate manpages for lli, lldb-mi & git-clang-format diff --git a/debian/patches/use-deb-json.diff b/debian/patches/use-deb-json.diff index 170abd0a..8f9261fb 100644 --- a/debian/patches/use-deb-json.diff +++ b/debian/patches/use-deb-json.diff @@ -1,8 +1,8 @@ -Index: llvm-toolchain-3.8_3.8~+rc1/polly/lib/Makefile +Index: b/polly/lib/Makefile =================================================================== ---- llvm-toolchain-3.8_3.8~+rc1.orig/polly/lib/Makefile -+++ llvm-toolchain-3.8_3.8~+rc1/polly/lib/Makefile -@@ -26,9 +26,9 @@ ISL_CODEGEN_FILES= CodeGen/IslAst.cpp \ +--- a/polly/lib/Makefile ++++ b/polly/lib/Makefile +@@ -26,9 +26,9 @@ CodeGen/IslNodeBuilder.cpp \ CodeGen/CodeGeneration.cpp @@ -15,17 +15,17 @@ Index: llvm-toolchain-3.8_3.8~+rc1/polly/lib/Makefile ISL_FILES= External/isl/basis_reduction_tab.c \ External/isl/isl_aff.c \ -@@ -146,4 +146,5 @@ SOURCES= Polly.cpp \ +@@ -146,4 +146,5 @@ # include $(LEVEL)/Makefile.common -LIBS += $(POLLY_LD) $(POLLY_LIB) +LIBS += $(POLLY_LD) $(POLLY_LIB) -ljsoncpp + -Index: llvm-toolchain-3.8_3.8~+rc1/polly/lib/CMakeLists.txt +Index: b/polly/lib/CMakeLists.txt =================================================================== ---- llvm-toolchain-3.8_3.8~+rc1.orig/polly/lib/CMakeLists.txt -+++ llvm-toolchain-3.8_3.8~+rc1/polly/lib/CMakeLists.txt +--- a/polly/lib/CMakeLists.txt ++++ b/polly/lib/CMakeLists.txt @@ -1,10 +1,10 @@ set(LLVM_NO_RTTI 1) @@ -42,7 +42,7 @@ Index: llvm-toolchain-3.8_3.8~+rc1/polly/lib/CMakeLists.txt set(ISL_CODEGEN_FILES CodeGen/IslAst.cpp -@@ -46,7 +46,7 @@ add_polly_library(Polly +@@ -46,7 +46,7 @@ Support/RegisterPasses.cpp Support/ScopHelper.cpp Support/ScopLocation.cpp @@ -51,7 +51,7 @@ Index: llvm-toolchain-3.8_3.8~+rc1/polly/lib/CMakeLists.txt Transform/Canonicalization.cpp Transform/CodePreparation.cpp Transform/DeadCodeElimination.cpp -@@ -54,7 +54,7 @@ add_polly_library(Polly +@@ -54,7 +54,7 @@ ${POLLY_HEADER_FILES} ) @@ -60,3 +60,35 @@ Index: llvm-toolchain-3.8_3.8~+rc1/polly/lib/CMakeLists.txt if (BUILD_SHARED_LIBS) target_link_libraries(Polly +Index: b/polly/CMakeLists.txt +=================================================================== +--- a/polly/CMakeLists.txt ++++ b/polly/CMakeLists.txt +@@ -128,10 +128,13 @@ + INCLUDE_DIRECTORIES( ${CUDALIB_INCLUDE_DIR} ) + endif(CUDALIB_FOUND) + ++find_path(JSONCPP_INCLUDE_PATH json/json.h PATH_SUFFIXES jsoncpp) ++ + include_directories( + BEFORE + ${CMAKE_CURRENT_SOURCE_DIR}/include +- ${CMAKE_CURRENT_SOURCE_DIR}/lib/JSON/include ++# ${CMAKE_CURRENT_SOURCE_DIR}/lib/JSON/include ++ ${JSONCPP_INCLUDE_PATH} + ${CMAKE_CURRENT_BINARY_DIR}/lib/External/isl/include + ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/isl/include + ${CMAKE_CURRENT_BINARY_DIR}/include +Index: b/polly/Makefile.config.in +=================================================================== +--- a/polly/Makefile.config.in ++++ b/polly/Makefile.config.in +@@ -53,7 +53,7 @@ + POLLY_INC := @cuda_inc@ \ + -I$(POLLY_OBJ_ROOT)/lib/External/isl/include \ + -I$(POLLY_OBJ_ROOT)/lib/External/isl \ +- -I$(POLLY_SRC_ROOT)/lib/JSON/include \ ++ -I/usr/include/jsoncpp \ + -I$(POLLY_SRC_ROOT)/lib/External/isl/include \ + -I$(POLLY_SRC_ROOT)/lib/External/isl/imath \ + -I$(POLLY_SRC_ROOT)/lib/External/isl From 11c82686ccc424692fdb0310cd3751625387bf42 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 28 Aug 2016 09:35:08 +0000 Subject: [PATCH 14/14] Port to kfreebsd. Many thanks to Pino Toscano (Closes: #835665) --- debian/changelog | 2 + debian/patches/kfreebsd-support.diff | 74 ++++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 77 insertions(+) create mode 100644 debian/patches/kfreebsd-support.diff diff --git a/debian/changelog b/debian/changelog index ab4febfb..62270c0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ llvm-toolchain-3.8 (1:3.8.1-10) UNRELEASED; urgency=medium * Fix the usage of jsoncpp in polly. Thanks to James Clarke for the patch (Closes: #835606) + * Port to kfreebsd. Many thanks to Pino Toscano + (Closes: #835665) -- Sylvestre Ledru Sat, 27 Aug 2016 17:36:06 +0200 diff --git a/debian/patches/kfreebsd-support.diff b/debian/patches/kfreebsd-support.diff new file mode 100644 index 00000000..de38cfee --- /dev/null +++ b/debian/patches/kfreebsd-support.diff @@ -0,0 +1,74 @@ +--- a/compiler-rt/cmake/config-ix.cmake ++++ b/compiler-rt/cmake/config-ix.cmake +@@ -560,7 +560,8 @@ endif() + + if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND + (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR +- (OS_NAME MATCHES "Windows" AND MSVC))) ++ (OS_NAME MATCHES "Windows" AND MSVC)) ++ AND NOT (OS_NAME STREQUAL "kFreeBSD")) + set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE) + else() + set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE) +--- a/tools/llvm-shlib/CMakeLists.txt ++++ b/tools/llvm-shlib/CMakeLists.txt +@@ -42,7 +42,7 @@ add_llvm_library(LLVM SHARED DISABLE_LLV + set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME + + list(REMOVE_DUPLICATES LIB_NAMES) +-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf" ++if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: It should be "GNU ld for elf" + # GNU ld doesn't resolve symbols in the version script. + set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive) + elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") +--- a/lldb/cmake/LLDBDependencies.cmake ++++ b/lldb/cmake/LLDBDependencies.cmake +@@ -153,7 +153,7 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo + endif() + endif() + # On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc. +-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD") ++if ((CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD") AND NOT CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") + list(APPEND LLDB_SYSTEM_LIBS execinfo) + endif() + +--- a/lldb/scripts/utilsOsType.py ++++ b/lldb/scripts/utilsOsType.py +@@ -35,6 +35,7 @@ if sys.version_info.major >= 3: + Linux = 3 + NetBSD = 4 + Windows = 5 ++ kFreeBSD = 6 + else: + class EnumOsType(object): + values = ["Unknown", +@@ -42,7 +43,8 @@ else: + "FreeBSD", + "Linux", + "NetBSD", +- "Windows"] ++ "Windows", ++ "kFreeBSD"] + class __metaclass__(type): + #++--------------------------------------------------------------------------- + # Details: Fn acts as an enumeration. +@@ -86,5 +88,7 @@ def determine_os_type(): + eOSType = EnumOsType.NetBSD + elif strOS == "win32": + eOSType = EnumOsType.Windows ++ elif strOS.startswith("gnukfreebsd"): ++ eOSType = EnumOsType.kFreeBSD + + return eOSType +--- a/lldb/scripts/Python/modules/CMakeLists.txt ++++ b/lldb/scripts/Python/modules/CMakeLists.txt +@@ -5,7 +5,7 @@ if (CXX_SUPPORTS_NO_MACRO_REDEFINED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined") + endif () + +-# build the Python readline suppression module only on Linux +-if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__) ++# build the Python readline suppression module only on Linux or GNU systems ++if ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "GNU" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") AND NOT __ANDROID_NDK__) + add_subdirectory(readline) + endif() diff --git a/debian/patches/series b/debian/patches/series index 362c252a..c80f4ef6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -44,3 +44,4 @@ mips-fpxx-enable.diff lldb-link-atomic-cmake.patch D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff +kfreebsd-support.diff