From e3860ed46e6465d06df36c62bc9368fed72618dd Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 19:31:07 +0200 Subject: [PATCH 1/7] fix the package names --- debian/changelog | 2 +- debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 2ec3dcf0..df45ea20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-snapshot (1:7~+rc1-1~exp1) experimental; urgency=medium +llvm-toolchain-7 (1:7~+rc1-1~exp1) experimental; urgency=medium * First testing release of 7 diff --git a/debian/control b/debian/control index cb4f285c..81047b3f 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: llvm-toolchain-snapshot +Source: llvm-toolchain-7 Section: devel Priority: optional Maintainer: LLVM Packaging Team From 4f8870db828c59830ed0720b727915d700eda0b6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 19:32:39 +0200 Subject: [PATCH 2/7] - Rename packages - Update the VCS-* URL --- debian/changelog | 2 ++ debian/control | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index df45ea20..fddaddbc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ llvm-toolchain-7 (1:7~+rc1-1~exp1) experimental; urgency=medium * First testing release of 7 + - Rename packages + - Update the VCS-* URL [ Dimitri John Ledkov ] * Enable lldb on ppc64el LP: #1777136 diff --git a/debian/control b/debian/control index 81047b3f..2d046fe9 100644 --- a/debian/control +++ b/debian/control @@ -19,8 +19,8 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, Build-Conflicts: oprofile, ocaml, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev Standards-Version: 4.1.5 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 7 +Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/7 # ------------- clang ------------- From 25dc6a5c3e3cd64bd8adcaa8a9f143167e714322 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 19:33:08 +0200 Subject: [PATCH 3/7] Standards-Version to 4.2.0 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index fddaddbc..1a99f3be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp1) experimental; urgency=medium * First testing release of 7 - Rename packages - Update the VCS-* URL + * Standards-Version to 4.2.0 [ Dimitri John Ledkov ] * Enable lldb on ppc64el LP: #1777136 diff --git a/debian/control b/debian/control index 2d046fe9..b518fc9f 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, # libctypes-ocaml-dev [amd64 arm64 armel armhf i386 ppc64el s390x], # dh-ocaml [amd64 arm64 armel armhf i386 ppc64el s390x], Build-Conflicts: oprofile, ocaml, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev -Standards-Version: 4.1.5 +Standards-Version: 4.2.0 Homepage: https://www.llvm.org/ Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b 7 Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/7 From dc5cfff698a78f843bc340657297d74b7e6e5d28 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 19:38:19 +0200 Subject: [PATCH 4/7] update the readme to match the new directory name --- debian/README | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/README b/debian/README index 35879f3f..414623b8 100644 --- a/debian/README +++ b/debian/README @@ -2,7 +2,7 @@ Organization of the repository ============================== The debian package for each LLVM point release is maintained as a git branch. -For example, the 7 release lives at in the "7.0" branch. +For example, the 7 release lives at in the "7" branch. The current snapshot release is maintained in the "snapshot" branch. @@ -50,12 +50,12 @@ Retrieving a specific branch or release candidate with orig-tar.sh ================================================================== When using orig-tar.sh, if you need to retrieve a specific branch, you can pass -the branch name as the first argument. For example, to get the 7.0 release +the branch name as the first argument. For example, to get the 7 release branch at http://llvm.org/svn/llvm-project/{llvm,...}/branches/release_70 you should use, - $ sh 7.0/debian/orig-tar.sh release_70 + $ sh 7/debian/orig-tar.sh release_70 To retrieve a specific release candidate, you can pass the branch name as the first argument, and the tag rc number as the second argument. For example, to @@ -63,11 +63,11 @@ get the 7.0.1 release candidate rc3 at http://llvm.org/svn/llvm-project/{llvm,...}/tags/RELEASE_701/rc3 you should use, - $ sh 7.0/debian/orig-tar.sh RELEASE_701 rc3 7.0.1 + $ sh 7/debian/orig-tar.sh RELEASE_701 rc3 7.0.1 For a stable release, the syntax is: - $ sh 7.0/debian/orig-tar.sh RELEASE_700 final 7.0 + $ sh 7/debian/orig-tar.sh RELEASE_700 final 7.0 Additional maintainer scripts From 953f31b2f54136c2951955a535b1072112863b5a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 19:38:39 +0200 Subject: [PATCH 5/7] add the 7 to the list of packages --- debian/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/README b/debian/README index 414623b8..19bd20b4 100644 --- a/debian/README +++ b/debian/README @@ -9,7 +9,7 @@ The current snapshot release is maintained in the "snapshot" branch. The easiest way to get all branches is probably to have one clone per version: -for f in 4.0 5.0 6.0 snapshot; do +for f in 4.0 5.0 6.0 7 snapshot; do git clone git@salsa.debian.org:pkg-llvm-team/llvm-toolchain.git -b $f $f done From 800a3c8a96667b846f0ade1a2ac0619055e2cf1d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 21:09:31 +0200 Subject: [PATCH 6/7] rebase of the patch --- .../23-strlcpy_strlcat_warning_removed.diff | 48 ++++++++++++------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/debian/patches/23-strlcpy_strlcat_warning_removed.diff b/debian/patches/23-strlcpy_strlcat_warning_removed.diff index 235ffd4d..e25c44d6 100644 --- a/debian/patches/23-strlcpy_strlcat_warning_removed.diff +++ b/debian/patches/23-strlcpy_strlcat_warning_removed.diff @@ -7,9 +7,11 @@ clang/test/Sema/warn-strlcpycat-size.c | 55 -------------- 6 files changed, 25 insertions(+), 78 deletions(-) ---- a/clang/include/clang/Basic/Builtins.def -+++ b/clang/include/clang/Basic/Builtins.def -@@ -488,8 +488,8 @@ BUILTIN(__builtin___memset_chk, "v*v*izz +Index: llvm-toolchain-7_7~+rc1/clang/include/clang/Basic/Builtins.def +=================================================================== +--- llvm-toolchain-7_7~+rc1.orig/clang/include/clang/Basic/Builtins.def ++++ llvm-toolchain-7_7~+rc1/clang/include/clang/Basic/Builtins.def +@@ -503,8 +503,8 @@ BUILTIN(__builtin___memset_chk, "v*v*izz BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF") BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF") BUILTIN(__builtin___strcpy_chk, "c*c*cC*z", "nF") @@ -20,7 +22,7 @@ BUILTIN(__builtin___strncat_chk, "c*c*cC*zz", "nF") BUILTIN(__builtin___strncpy_chk, "c*c*cC*zz", "nF") BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF") -@@ -874,8 +874,8 @@ LIBBUILTIN(getcontext, "iK*", "fj", +@@ -952,8 +952,8 @@ LIBBUILTIN(getcontext, "iK*", "fj", LIBBUILTIN(_longjmp, "vJi", "fr", "setjmp.h", ALL_GNU_LANGUAGES) LIBBUILTIN(siglongjmp, "vSJi", "fr", "setjmp.h", ALL_GNU_LANGUAGES) // non-standard but very common @@ -30,10 +32,12 @@ +//LIBBUILTIN(strlcat, "zc*cC*z", "f", "string.h", ALL_GNU_LANGUAGES) // id objc_msgSend(id, SEL, ...) LIBBUILTIN(objc_msgSend, "GGH.", "f", "objc/message.h", OBJC_LANG) - // long double objc_msgSend_fpret(id self, SEL op, ...) ---- a/clang/lib/AST/Decl.cpp -+++ b/clang/lib/AST/Decl.cpp -@@ -3455,13 +3455,13 @@ unsigned FunctionDecl::getMemoryFunction + // long double objc_msgSend_fpret(id self, SEL op, ...) +Index: llvm-toolchain-7_7~+rc1/clang/lib/AST/Decl.cpp +=================================================================== +--- llvm-toolchain-7_7~+rc1.orig/clang/lib/AST/Decl.cpp ++++ llvm-toolchain-7_7~+rc1/clang/lib/AST/Decl.cpp +@@ -3591,13 +3591,13 @@ unsigned FunctionDecl::getMemoryFunction case Builtin::BImemmove: return Builtin::BImemmove; @@ -53,9 +57,11 @@ case Builtin::BI__builtin_memcmp: case Builtin::BImemcmp: ---- a/clang/lib/Sema/SemaChecking.cpp -+++ b/clang/lib/Sema/SemaChecking.cpp -@@ -975,8 +975,8 @@ Sema::CheckBuiltinFunctionCall(FunctionD +Index: llvm-toolchain-7_7~+rc1/clang/lib/Sema/SemaChecking.cpp +=================================================================== +--- llvm-toolchain-7_7~+rc1.orig/clang/lib/Sema/SemaChecking.cpp ++++ llvm-toolchain-7_7~+rc1/clang/lib/Sema/SemaChecking.cpp +@@ -1224,8 +1224,8 @@ Sema::CheckBuiltinFunctionCall(FunctionD case Builtin::BI__builtin___memcpy_chk: case Builtin::BI__builtin___memmove_chk: case Builtin::BI__builtin___memset_chk: @@ -66,7 +72,7 @@ case Builtin::BI__builtin___strncat_chk: case Builtin::BI__builtin___strncpy_chk: case Builtin::BI__builtin___stpncpy_chk: -@@ -2512,9 +2512,10 @@ bool Sema::CheckFunctionCall(FunctionDec +@@ -4064,9 +4064,10 @@ bool Sema::CheckFunctionCall(FunctionDec return false; // Handle memory setting and copying functions. @@ -80,9 +86,11 @@ CheckStrncatArguments(TheCall, FnInfo); else CheckMemaccessArguments(TheCall, CMId, FnInfo); ---- a/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp -+++ b/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp -@@ -237,9 +237,9 @@ GenericTaintChecker::TaintPropagationRul +Index: llvm-toolchain-7_7~+rc1/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +=================================================================== +--- llvm-toolchain-7_7~+rc1.orig/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp ++++ llvm-toolchain-7_7~+rc1/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp +@@ -240,9 +240,9 @@ GenericTaintChecker::TaintPropagationRul case Builtin::BIstrncpy: case Builtin::BIstrncat: return TaintPropagationRule(1, 2, 0, true); @@ -95,8 +103,10 @@ case Builtin::BIstrndup: return TaintPropagationRule(0, 1, ReturnValueIndex); ---- a/clang/test/Sema/builtins.c -+++ b/clang/test/Sema/builtins.c +Index: llvm-toolchain-7_7~+rc1/clang/test/Sema/builtins.c +=================================================================== +--- llvm-toolchain-7_7~+rc1.orig/clang/test/Sema/builtins.c ++++ llvm-toolchain-7_7~+rc1/clang/test/Sema/builtins.c @@ -190,11 +190,11 @@ void test18() { ptr = __builtin___memccpy_chk(dst, src, '\037', sizeof(src), sizeof(dst)); @@ -135,7 +145,9 @@ } // rdar://11076881 ---- a/clang/test/Sema/warn-strlcpycat-size.c +Index: llvm-toolchain-7_7~+rc1/clang/test/Sema/warn-strlcpycat-size.c +=================================================================== +--- llvm-toolchain-7_7~+rc1.orig/clang/test/Sema/warn-strlcpycat-size.c +++ /dev/null @@ -1,55 +0,0 @@ -// RUN: %clang_cc1 -Wstrlcpy-strlcat-size -verify -fsyntax-only %s From 2856c91f130c187a822a55b0fa9a9381f6d166ce Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 7 Aug 2018 21:09:54 +0200 Subject: [PATCH 7/7] update of the unpack script for 7 --- debian/unpack.sh | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/debian/unpack.sh b/debian/unpack.sh index 7c96077f..27fd0905 100644 --- a/debian/unpack.sh +++ b/debian/unpack.sh @@ -1,24 +1,23 @@ set -e - -MAJOR_VERSION=`ls -1 *svn*bz2 | tail -1|perl -ne 'print "$1\n" if /(\d+)~svn/;' | sort -ru` -SVN_REV=`ls -1 *svn*bz2 | tail -1|perl -ne 'print "$1\n" if /svn(\d+)/;' | sort -ru` -echo "Unpack of llvm" -tar jxf llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig.tar.bz2 -cd llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV/ || ( echo "Bad SVN_REV:\"$SVN_REV\"" && exit 1 ) -for f in ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-clang.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-clang-tools-extra.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-compiler-rt.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-lld.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-lldb.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-polly.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-openmp.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-libcxx.tar.bz2 ../llvm-toolchain-snapshot_$MAJOR_VERSION~svn$SVN_REV.orig-libcxxabi.tar.bz2; do - if test -e $f; then - echo "unpack of $f" - tar jxf $f - fi +MAJOR_VERSION=7 +SVN_REV=`ls -1 *$MAJOR_VERSION*svn*bz2 | tail -1|perl -ne 'print "$1\n" if /svn(\d+)/;' | sort -ru` +#SVN_REV=288149 +#VERSION=svn$SVN_REV +VERSION=+rc1 +tar jxvf llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig.tar.bz2 +cd llvm-toolchain-7_$MAJOR_VERSION~$VERSION/ || ( echo "Bad SVN_REV:\"$SVN_REV\"" && exit 1 ) +for f in ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-clang.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-clang-tools-extra.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-compiler-rt.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-lldb.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-polly.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-libcxxabi.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-libcxx.tar.bz2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-openmp.tar.bz2; do #2 ../llvm-toolchain-7_$MAJOR_VERSION~$VERSION.orig-openmp.tar.bz2; do + tar jxvf $f done -ln -s clang_$MAJOR_VERSION~svn$SVN_REV clang -ln -s clang-tools-extra_$MAJOR_VERSION~svn$SVN_REV clang-tools-extra -ln -s compiler-rt_$MAJOR_VERSION~svn$SVN_REV compiler-rt -ln -s polly_$MAJOR_VERSION~svn$SVN_REV polly -ln -s lld_$MAJOR_VERSION~svn$SVN_REV lld -ln -s lldb_$MAJOR_VERSION~svn$SVN_REV lldb -ln -s openmp_$MAJOR_VERSION~svn$SVN_REV openmp -ln -s libcxx_$MAJOR_VERSION~svn$SVN_REV libcxx -ln -s libcxxabi_$MAJOR_VERSION~svn$SVN_REV libcxxabi -cp -R ../snapshot/debian . + +ln -s clang_$MAJOR_VERSION~$VERSION clang +ln -s clang-tools-extra_$MAJOR_VERSION~$VERSION clang-tools-extra +ln -s compiler-rt_$MAJOR_VERSION~$VERSION compiler-rt +ln -s polly_$MAJOR_VERSION~$VERSION polly +ln -s lldb_$MAJOR_VERSION~$VERSION lldb +ln -s openmp_$MAJOR_VERSION~$VERSION openmp +ln -s libcxx_$MAJOR_VERSION~$VERSION libcxx +ln -s libcxxabi_$MAJOR_VERSION~$VERSION libcxxabi + +cp -R ../$MAJOR_VERSION/debian . QUILT_PATCHES=debian/patches/ quilt push -a --fuzz=0