diff --git a/debian/changelog b/debian/changelog index 80385b35..8045cc89 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,31 @@ +llvm-toolchain-6.0 (1:6.0-3) unstable; urgency=medium + + * Remove sysconf_interceptor_bypass_test.cc because it makes + Debian unstable and Ubuntu bionic freeze + * Remove the info text from the manpages (Closes: #894734) + + [ Reshabh Sharma ] + * Enable autopkgtest for amd64 & i386 on the llvm test suite + (Closes: #774294) + + [ Nicholas D Steeves ] + * Fix the lintian error 'privacy-breach-uses-embedded-file' + (Closes: #829361) + + [ Athos Ribeiro ] + * Create symlink to run-clang-tidy-X.Y.py to remove its .py extension + (Closes: #892089) + + [ David Tenty ] + * Migrate to automatic debug packages (Closes: #893267) + + [ Nishanth Aravamudan ] + * debian/patches/install-lldb-sb-headers.patch: Install lldb's + SB headers (pr36630). Thanks to Pavel Labath . + (LP: #1761009) (Closes: #895051) + + -- Sylvestre Ledru Wed, 28 Mar 2018 09:18:47 +0200 + llvm-toolchain-6.0 (1:6.0.1-1~exp1) experimental; urgency=medium * preparation of the new release diff --git a/debian/clang-tidy-X.Y.links.in b/debian/clang-tidy-X.Y.links.in index 5d959f49..ad03ae1d 100644 --- a/debian/clang-tidy-X.Y.links.in +++ b/debian/clang-tidy-X.Y.links.in @@ -1,3 +1,4 @@ usr/lib/llvm-@LLVM_VERSION@/share/clang/run-clang-tidy.py usr/bin/run-clang-tidy-@LLVM_VERSION@.py +usr/lib/llvm-@LLVM_VERSION@/share/clang/run-clang-tidy.py usr/bin/run-clang-tidy-@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-tidy-diff.py usr/bin/clang-tidy-diff-@LLVM_VERSION@.py diff --git a/debian/control b/debian/control index 17047f4a..39c709ce 100644 --- a/debian/control +++ b/debian/control @@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, libjsoncpp-dev, pkg-config, lcov, procps, help2man, zlib1g-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], + libjs-mathjax # ocaml-nox [amd64 arm64 armel armhf i386 ppc64el s390x], # ocaml-findlib [amd64 arm64 armel armhf i386 ppc64el s390x], # libctypes-ocaml-dev [amd64 arm64 armel armhf i386 ppc64el s390x], @@ -84,7 +85,7 @@ Description: clang-based C++ linter tool Package: clang-6.0-doc Architecture: all Section: doc -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends}, libjs-mathjax Description: C, C++ and Objective-C compiler - Documentation Clang project is a C, C++, Objective C and Objective C++ front-end based on the LLVM compiler. Its goal is to offer a replacement to the diff --git a/debian/patches/0048-Set-html_static_path-_static-everywhere.patch b/debian/patches/0048-Set-html_static_path-_static-everywhere.patch new file mode 100644 index 00000000..10663a82 --- /dev/null +++ b/debian/patches/0048-Set-html_static_path-_static-everywhere.patch @@ -0,0 +1,63 @@ +From: Nicholas D Steeves +Date: Sat, 10 Feb 2018 21:00:55 -0500 +Subject: Set html_static_path = ['_static'] everywhere. + +--- + clang-tools-extra/docs/conf.py | 2 +- + clang/docs/analyzer/conf.py | 2 +- + clang/docs/conf.py | 2 +- + polly/docs/conf.py | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py +index e872c55..69f425a 100644 +--- a/clang-tools-extra/docs/conf.py ++++ b/clang-tools-extra/docs/conf.py +@@ -121,7 +121,7 @@ html_theme = 'haiku' + # Add any paths that contain custom static files (such as style sheets) here, + # relative to this directory. They are copied after the builtin static files, + # so a file named "default.css" will overwrite the builtin "default.css". +-html_static_path = [] ++html_static_path = ['_static'] + + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. +diff --git a/clang/docs/analyzer/conf.py b/clang/docs/analyzer/conf.py +index c40af7a..666308d 100644 +--- a/clang/docs/analyzer/conf.py ++++ b/clang/docs/analyzer/conf.py +@@ -121,7 +121,7 @@ html_theme = 'haiku' + # Add any paths that contain custom static files (such as style sheets) here, + # relative to this directory. They are copied after the builtin static files, + # so a file named "default.css" will overwrite the builtin "default.css". +-html_static_path = [] ++html_static_path = ['_static'] + + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index a9861cd..d125dc6 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -121,7 +121,7 @@ html_theme = 'haiku' + # Add any paths that contain custom static files (such as style sheets) here, + # relative to this directory. They are copied after the builtin static files, + # so a file named "default.css" will overwrite the builtin "default.css". +-html_static_path = [] ++html_static_path = ['_static'] + + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. +diff --git a/polly/docs/conf.py b/polly/docs/conf.py +index 64d3968..aa854ad 100644 +--- a/polly/docs/conf.py ++++ b/polly/docs/conf.py +@@ -127,7 +127,7 @@ except ImportError: + # Add any paths that contain custom static files (such as style sheets) here, + # relative to this directory. They are copied after the builtin static files, + # so a file named "default.css" will overwrite the builtin "default.css". +-html_static_path = [] ++html_static_path = ['_static'] + + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. diff --git a/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch b/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch new file mode 100644 index 00000000..dce925ee --- /dev/null +++ b/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch @@ -0,0 +1,122 @@ +From: Nicholas D Steeves +Date: Sat, 10 Feb 2018 21:02:17 -0500 +Subject: Use Debian-provided MathJax everywhere. + +--- + clang-tools-extra/docs/Doxyfile | 2 +- + clang-tools-extra/docs/conf.py | 3 +++ + clang-tools-extra/docs/doxygen.cfg.in | 2 +- + clang/docs/analyzer/conf.py | 3 +++ + clang/docs/conf.py | 3 +++ + clang/docs/doxygen.cfg.in | 2 +- + docs/doxygen.cfg.in | 2 +- + polly/docs/doxygen.cfg.in | 2 +- + 8 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/clang-tools-extra/docs/Doxyfile b/clang-tools-extra/docs/Doxyfile +index d674390..1bf4f72 100644 +--- a/clang-tools-extra/docs/Doxyfile ++++ b/clang-tools-extra/docs/Doxyfile +@@ -1206,7 +1206,7 @@ USE_MATHJAX = NO + # MathJax, but it is strongly recommended to install a local copy of MathJax + # before deployment. + +-MATHJAX_RELPATH = http://www.mathjax.org/mathjax ++MATHJAX_RELPATH = /usr/share/javascript/mathjax + + # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension + # names that should be enabled during MathJax rendering. +diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py +index 69f425a..46f8eea 100644 +--- a/clang-tools-extra/docs/conf.py ++++ b/clang-tools-extra/docs/conf.py +@@ -123,6 +123,9 @@ html_theme = 'haiku' + # so a file named "default.css" will overwrite the builtin "default.css". + html_static_path = ['_static'] + ++# Use Debian-provided MathJax ++mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ++ + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. + #html_last_updated_fmt = '%b %d, %Y' +diff --git a/clang-tools-extra/docs/doxygen.cfg.in b/clang-tools-extra/docs/doxygen.cfg.in +index 6dbf6db..da44cfc 100644 +--- a/clang-tools-extra/docs/doxygen.cfg.in ++++ b/clang-tools-extra/docs/doxygen.cfg.in +@@ -1438,7 +1438,7 @@ MATHJAX_FORMAT = HTML-CSS + # The default value is: http://cdn.mathjax.org/mathjax/latest. + # This tag requires that the tag USE_MATHJAX is set to YES. + +-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest ++MATHJAX_RELPATH = /usr/share/javascript/mathjax + + # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax + # extension names that should be enabled during MathJax rendering. For example +diff --git a/clang/docs/analyzer/conf.py b/clang/docs/analyzer/conf.py +index 666308d..2881bcc 100644 +--- a/clang/docs/analyzer/conf.py ++++ b/clang/docs/analyzer/conf.py +@@ -123,6 +123,9 @@ html_theme = 'haiku' + # so a file named "default.css" will overwrite the builtin "default.css". + html_static_path = ['_static'] + ++# Use Debian-provided MathJax ++mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ++ + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. + #html_last_updated_fmt = '%b %d, %Y' +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index d125dc6..2ce1a91 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -123,6 +123,9 @@ html_theme = 'haiku' + # so a file named "default.css" will overwrite the builtin "default.css". + html_static_path = ['_static'] + ++# Use Debian-provided MathJax ++mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ++ + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, + # using the given strftime format. + #html_last_updated_fmt = '%b %d, %Y' +diff --git a/clang/docs/doxygen.cfg.in b/clang/docs/doxygen.cfg.in +index 13ed722..77bed6e 100644 +--- a/clang/docs/doxygen.cfg.in ++++ b/clang/docs/doxygen.cfg.in +@@ -1432,7 +1432,7 @@ MATHJAX_FORMAT = HTML-CSS + # The default value is: http://cdn.mathjax.org/mathjax/latest. + # This tag requires that the tag USE_MATHJAX is set to YES. + +-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest ++MATHJAX_RELPATH = /usr/share/javascript/mathjax + + # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax + # extension names that should be enabled during MathJax rendering. For example +diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in +index e3c7f47..dcdade1 100644 +--- a/docs/doxygen.cfg.in ++++ b/docs/doxygen.cfg.in +@@ -1433,7 +1433,7 @@ MATHJAX_FORMAT = HTML-CSS + # The default value is: http://cdn.mathjax.org/mathjax/latest. + # This tag requires that the tag USE_MATHJAX is set to YES. + +-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest ++MATHJAX_RELPATH = /usr/share/javascript/mathjax + + # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax + # extension names that should be enabled during MathJax rendering. For example +diff --git a/polly/docs/doxygen.cfg.in b/polly/docs/doxygen.cfg.in +index 36786aa..26a8984 100644 +--- a/polly/docs/doxygen.cfg.in ++++ b/polly/docs/doxygen.cfg.in +@@ -1433,7 +1433,7 @@ MATHJAX_FORMAT = HTML-CSS + # The default value is: http://cdn.mathjax.org/mathjax/latest. + # This tag requires that the tag USE_MATHJAX is set to YES. + +-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest ++MATHJAX_RELPATH = /usr/share/javascript/mathjax + + # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax + # extension names that should be enabled during MathJax rendering. For example diff --git a/debian/patches/glibc_2.27.diff b/debian/patches/glibc_2.27.diff new file mode 100644 index 00000000..fa53ba47 --- /dev/null +++ b/debian/patches/glibc_2.27.diff @@ -0,0 +1,77 @@ +# DP: Fix PR sanitizer/84761, taken from the trunk + +libsanitizer/ + +2018-03-19 Jakub Jelinek + + PR sanitizer/84761 + * sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ): + Define if not defined. + (DL_INTERNAL_FUNCTION): Don't define. + (InitTlsSize): For __i386__ if not compiled against glibc 2.27+ + determine at runtime whether to use regparm(3), stdcall calling + convention for older glibcs or normal calling convention for + newer glibcs for call to _dl_get_tls_static_info. + +Index: llvm-toolchain-5.0-5.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc +=================================================================== +--- llvm-toolchain-5.0-5.0.1.orig/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc ++++ llvm-toolchain-5.0-5.0.1/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc +@@ -148,28 +148,43 @@ bool SanitizerGetThreadName(char *name, + #endif + } + ++#ifndef __GLIBC_PREREQ ++#define __GLIBC_PREREQ(x, y) 0 ++#endif ++ + #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO + static uptr g_tls_size; + +-#ifdef __i386__ +-# define DL_INTERNAL_FUNCTION __attribute__((regparm(3), stdcall)) +-#else +-# define DL_INTERNAL_FUNCTION +-#endif +- + void InitTlsSize() { + // all current supported platforms have 16 bytes stack alignment + const size_t kStackAlign = 16; +- typedef void (*get_tls_func)(size_t*, size_t*) DL_INTERNAL_FUNCTION; +- get_tls_func get_tls; +- void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info"); +- CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr)); +- internal_memcpy(&get_tls, &get_tls_static_info_ptr, +- sizeof(get_tls_static_info_ptr)); +- CHECK_NE(get_tls, 0); + size_t tls_size = 0; + size_t tls_align = 0; +- get_tls(&tls_size, &tls_align); ++ void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info"); ++#if defined(__i386__) && !__GLIBC_PREREQ(2, 27) ++ /* On i?86, _dl_get_tls_static_info used to be internal_function, i.e. ++ __attribute__((regparm(3), stdcall)) before glibc 2.27 and is normal ++ function in 2.27 and later. */ ++ if (!dlvsym(RTLD_NEXT, "glob", "GLIBC_2.27")) { ++ typedef void (*get_tls_func)(size_t*, size_t*) ++ __attribute__((regparm(3), stdcall)); ++ get_tls_func get_tls; ++ CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr)); ++ internal_memcpy(&get_tls, &get_tls_static_info_ptr, ++ sizeof(get_tls_static_info_ptr)); ++ CHECK_NE(get_tls, 0); ++ get_tls(&tls_size, &tls_align); ++ } else ++#endif ++ { ++ typedef void (*get_tls_func)(size_t*, size_t*); ++ get_tls_func get_tls; ++ CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr)); ++ internal_memcpy(&get_tls, &get_tls_static_info_ptr, ++ sizeof(get_tls_static_info_ptr)); ++ CHECK_NE(get_tls, 0); ++ get_tls(&tls_size, &tls_align); ++ } + if (tls_align < kStackAlign) + tls_align = kStackAlign; + g_tls_size = RoundUpTo(tls_size, tls_align); diff --git a/debian/patches/series b/debian/patches/series index dea03f0e..3c8c772f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -49,4 +49,5 @@ test-keep-alive.diff sparc64-add-missing-tls-get-addr.diff remove-test-freezing.diff install-lldb-sb-headers.patch - +0048-Set-html_static_path-_static-everywhere.patch +0049-Use-Debian-provided-MathJax-everywhere.patch diff --git a/debian/rules b/debian/rules index e2d9e2da..8636ab39 100755 --- a/debian/rules +++ b/debian/rules @@ -339,14 +339,14 @@ build_doc: cd $$d && rm -f underscore.js && ln -s /usr/share/javascript/underscore/underscore.js && cd -; \ done - mkdir debian/man/ - 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 + mkdir -p debian/man/ + help2man --no-info --version-string=$(LLVM_VERSION) clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 + help2man --no-info --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 lldb-mi clang-format clang clang++ clang-tblgen clang-check clang-cpp clang-import-test clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld llvm-tblgen clang-change-namespace clang-offload-bundler"; \ 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 --version-string=$(LLVM_VERSION) $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ + LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --no-info --version-string=$(LLVM_VERSION) $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ done override_dh_auto_install: @@ -536,7 +536,8 @@ override_dh_auto_test: # LLVM tests ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK))) - $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm +# logs the output to check-llvm_build_log.txt for validation through autopkgtest + $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm | tee check-llvm_build_log.txt else $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm || true endif diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..82582ae3 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,4 @@ +Tests: llvm +Depends: @ +Restrictions: build-needed + diff --git a/debian/tests/llvm b/debian/tests/llvm new file mode 100644 index 00000000..c1a74d4e --- /dev/null +++ b/debian/tests/llvm @@ -0,0 +1,9 @@ +#!/bin/sh +# Checks llvm build passing on architectiures known to have 100% tests workings + +if grep -q "Unexpected Failure" check-llvm_build_log.txt; then + exit 1 +else + echo "build OK" +f1 +rm check-llvm_build_log.txt