From 653b063626d166781f5c9943a8354b5ce8c4b706 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 11:25:06 +0100 Subject: [PATCH 01/13] update of the changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3acfa9db..88a70933 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-snapshot (1:8~svn348749-1~exp1) experimental; urgency=medium + + * New snapshot release + * Merge changes from 7 into snapshot + + -- Sylvestre Ledru Mon, 10 Dec 2018 10:56:16 +0100 + llvm-toolchain-snapshot (1:8~svn346586-1~exp1) experimental; urgency=medium * New snapshot release From c4f8baa9370fc5d325d0853f630e483a0ef89c48 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 11:56:43 +0100 Subject: [PATCH 02/13] fix the patch --- debian/patches/D54584-powerpcspe-double-parameter.diff | 9 --------- 1 file changed, 9 deletions(-) diff --git a/debian/patches/D54584-powerpcspe-double-parameter.diff b/debian/patches/D54584-powerpcspe-double-parameter.diff index 47d6620f..4cefc7e7 100644 --- a/debian/patches/D54584-powerpcspe-double-parameter.diff +++ b/debian/patches/D54584-powerpcspe-double-parameter.diff @@ -87,15 +87,6 @@ Index: llvm-toolchain-snapshot_8~svn348749/lib/Target/PowerPC/PPCISelLowering.cp } } -@@ -9703,6 +9745,8 @@ void PPCTargetLowering::ReplaceNodeResul - case ISD::BITCAST: - // Don't handle bitcast here. - return; -+ case ISD::BITCAST: -+ return; - } - } - Index: llvm-toolchain-snapshot_8~svn348749/lib/Target/PowerPC/PPCISelLowering.h =================================================================== --- llvm-toolchain-snapshot_8~svn348749.orig/lib/Target/PowerPC/PPCISelLowering.h From d2b29624d30f342cfe453beff17da6b141fa806e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 16:09:36 +0100 Subject: [PATCH 03/13] Try to workaround the debug issues by adding -fno-addrsig to the *FLAGS One more time, thanks to Rebecca Palmer (Closes: #913946) --- debian/changelog | 2 ++ debian/rules | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index b45781cf..67a4a84f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ llvm-toolchain-7 (1:7.0.1~+rc3-2) UNRELEASED; urgency=medium * Fix llvm-config by stripping unnecessary flags See also https://bugs.llvm.org/show_bug.cgi?id=8220 (Closes: #697755, #914838) + * Try to workaround the debug issues by adding -fno-addrsig to the *FLAGS + One more time, thanks to Rebecca Palmer (Closes: #913946) * Improved the debian/patches/series presentation by creating categories -- Sylvestre Ledru Mon, 10 Dec 2018 03:49:59 -0500 diff --git a/debian/rules b/debian/rules index cac75113..eaccd3b5 100755 --- a/debian/rules +++ b/debian/rules @@ -124,9 +124,9 @@ endif endif # Enable for bootstrap -LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -CFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option +LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig +CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig +CFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig # Enable polly (or not) POLLY_ENABLE=yes From fd33d6731cf107f2e3e6b2a886dc33ac5153b359 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 18:56:48 +0100 Subject: [PATCH 04/13] force the +x on bin/* --- debian/changelog | 2 ++ debian/rules | 2 ++ 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index 67a4a84f..1872701f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ llvm-toolchain-7 (1:7.0.1~+rc3-2) UNRELEASED; urgency=medium (Closes: #697755, #914838) * Try to workaround the debug issues by adding -fno-addrsig to the *FLAGS One more time, thanks to Rebecca Palmer (Closes: #913946) + * Force the chmod +x on llvm-X/bin/* because it was sometimes removed + by the strip process * Improved the debian/patches/series presentation by creating categories -- Sylvestre Ledru Mon, 10 Dec 2018 03:49:59 -0500 diff --git a/debian/rules b/debian/rules index eaccd3b5..4d3deb76 100755 --- a/debian/rules +++ b/debian/rules @@ -704,6 +704,8 @@ else endif : # Remove the workaround rm $(CURDIR)/strip + : # for some reasons, the +x might be removed + chmod -f +x $(CURDIR)/debian/*/usr/lib/llvm-$(LLVM_VERSION)/bin/* || true override_dh_install: # cp $(TARGET_BUILD)/lib/libLLVM-$(LLVM_VERSION).so $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT) From e54f11d312468dc334a222ced16f37a2cf97e031 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 20:24:04 +0100 Subject: [PATCH 05/13] fix tab --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 4d3deb76..0d561aba 100755 --- a/debian/rules +++ b/debian/rules @@ -444,7 +444,7 @@ debian-libcxxabi-build: cd libcxx/build && \ $(PRE_PROCESS_CONF) $$CMAKE_BIN ../ \ $(LIBCXX_CMAKE_OPTIONS) \ - -DLIBCXX_CXX_ABI=libcxxabi \ + -DLIBCXX_CXX_ABI=libcxxabi \ -DLIBCXX_CXX_ABI_INCLUDE_PATHS=$(BASE_PATH)/libcxxabi/include \ -DLIBCXX_CXX_ABI_LIBRARY_PATH=$(BASE_PATH)/libcxxabi/build/lib \ -DLIBCXX_ENABLE_EXCEPTIONS=$(LIBCXX_EXCEPTIONS) \ @@ -790,7 +790,7 @@ endif # polly tests if test "$(POLLY_ENABLE)" = yes; then \ cd $(TARGET_BUILD)/ && LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ $(MAKE) -C tools/polly/test/ check-polly || true; \ - fi + fi # The compression of the code coverage report is done in the # hook B21GetCoverageResults on the server From 772552aa5c12717bb8df359570bee1a4c1352a40 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 20:25:25 +0100 Subject: [PATCH 06/13] move the code coverage decl above --- debian/rules | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/debian/rules b/debian/rules index 0d561aba..f3240513 100755 --- a/debian/rules +++ b/debian/rules @@ -123,6 +123,15 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) endif endif +ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) +# enable the code coverage + CODECOVERAGE=yes +# for -fvisibility-inlines-hidden see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130729/183016.html + CXXFLAGS_EXTRA += -fprofile-arcs -ftest-coverage + LDFLAGS_EXTRA += -coverage -lgcov + RUN_TEST=yes +endif + # Enable for bootstrap LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig @@ -145,15 +154,6 @@ ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) RUN_TEST=no endif -ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) -# enable the code coverage - CODECOVERAGE=yes -# for -fvisibility-inlines-hidden see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130729/183016.html - CXXFLAGS_EXTRA += -fprofile-arcs -ftest-coverage - LDFLAGS_EXTRA += -coverage -lgcov - RUN_TEST=yes -endif - ifneq (,$(filter scan-build,$(DEB_BUILD_OPTIONS))) # enable the build using scan-build # The package are installed through the variable declarations: From 1dfde1e31f0246df14f1e4e3adbcc8137a8a3b76 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 10 Dec 2018 20:26:29 +0100 Subject: [PATCH 07/13] try to send flags only to the bootstrap phase --- debian/rules | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index f3240513..62624555 100755 --- a/debian/rules +++ b/debian/rules @@ -133,9 +133,11 @@ ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) endif # Enable for bootstrap -LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig -CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig -CFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -fno-addrsig +LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option +CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option +BOOTSTRAP_CXXFLAGS_EXTRA = $(CXXFLAGS_EXTRA) -fno-addrsig +CFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option +BOOTSTRAP_CFLAGS_EXTRA = $(CFLAGS_EXTRA) -fno-addrsig # Enable polly (or not) POLLY_ENABLE=yes @@ -347,6 +349,8 @@ override_dh_auto_configure: preconfigure -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(opt_flags)" \ -DCMAKE_CXX_FLAGS='$(CXXFLAGS_EXTRA)' \ -DCMAKE_C_FLAGS='$(CFLAGS_EXTRA)' \ + -DBOOTSTRAP_CMAKE_CXX_FLAGS='$(BOOTSTRAP_CXXFLAGS_EXTRA)' \ + -DBOOTSTRAP_CMAKE_C_FLAGS='$(BOOTSTRAP_CFLAGS_EXTRA)' \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_INSTALL_UTILS=ON \ -DLLVM_VERSION_SUFFIX= \ From 8e911fd30c2e2519cdd1b92c48f2946bbf07ae11 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 11 Dec 2018 16:54:35 +0100 Subject: [PATCH 08/13] Force the link to atomic also for i386 as it fails on Debian jessie too --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1872701f..8bcba9cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ llvm-toolchain-7 (1:7.0.1~+rc3-2) UNRELEASED; urgency=medium * Force the chmod +x on llvm-X/bin/* because it was sometimes removed by the strip process * Improved the debian/patches/series presentation by creating categories + * Force the link to atomic also for i386 as it fails on Debian jessie too -- Sylvestre Ledru Mon, 10 Dec 2018 03:49:59 -0500 diff --git a/debian/rules b/debian/rules index 62624555..b38745dc 100755 --- a/debian/rules +++ b/debian/rules @@ -47,7 +47,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),s390x)) LIBCXX_EXCEPTIONS :=OFF endif -ifneq (,$(filter $(DEB_HOST_ARCH),armel mips mipsel powerpc powerpcspe riscv64)) +ifneq (,$(filter $(DEB_HOST_ARCH),i386 armel mips mipsel powerpc powerpcspe riscv64)) CMAKE_EXTRA += -DLIBOMP_LIBFLAGS="-latomic" -DCMAKE_SHARED_LINKER_FLAGS="-latomic" endif From 08afca5bde50c63f505f2bb221fc6c2c33c81e6d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 12 Dec 2018 21:00:37 +0100 Subject: [PATCH 09/13] improve the separation between *FLAGS for gcc and clang --- debian/rules | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/debian/rules b/debian/rules index b38745dc..4c7769fa 100755 --- a/debian/rules +++ b/debian/rules @@ -347,8 +347,6 @@ override_dh_auto_configure: preconfigure -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(opt_flags)" \ - -DCMAKE_CXX_FLAGS='$(CXXFLAGS_EXTRA)' \ - -DCMAKE_C_FLAGS='$(CFLAGS_EXTRA)' \ -DBOOTSTRAP_CMAKE_CXX_FLAGS='$(BOOTSTRAP_CXXFLAGS_EXTRA)' \ -DBOOTSTRAP_CMAKE_C_FLAGS='$(BOOTSTRAP_CFLAGS_EXTRA)' \ -DLLVM_LINK_LLVM_DYLIB=ON \ @@ -365,7 +363,7 @@ override_dh_auto_configure: preconfigure -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly;AVR" \ -DCLANG_ENABLE_BOOTSTRAP=ON \ -DCLANG_VENDOR=$(VENDOR) \ - -DCLANG_BOOTSTRAP_PASSTHROUGH="CMAKE_INSTALL_PREFIX;CMAKE_VERBOSE_MAKEFILE;CMAKE_BUILD_TYPE;CMAKE_CXX_FLAGS_RELWITHDEBINFO;CMAKE_CXX_FLAGS;CMAKE_C_FLAGS;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;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" + -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;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" # make @@ -374,7 +372,7 @@ VERBOSE=VERBOSE=1 #VERBOSE=-v debian-full-build: - $(PRE_PROCESS) make $(NJOBS) -C $(TARGET_BUILD) $(VERBOSE) CXXFLAGS="$(CXXFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1 DEBUGMAKE=1 $(BUILD_METHOD) + $(PRE_PROCESS) make $(NJOBS) -C $(TARGET_BUILD) $(VERBOSE) CFLAGS="$(CFLAGS_EXTRA)" CXXFLAGS="$(CXXFLAGS_EXTRA)" LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1 DEBUGMAKE=1 $(BUILD_METHOD) # Check the stage 2 build worked if test "$(BUILD_METHOD)" = "stage2"; then \ From a1a2358ee4999da4492c05efd3886860a5700206 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 12 Dec 2018 21:09:37 +0100 Subject: [PATCH 10/13] * Improved the debian/patches/series presentation by creating categories * Improve the separation between *FLAGS for gcc and clang. This is done for -fno-addrsig as it doesn't exit for gcc This can be done with the BOOTSTRAP_CMAKE_CXX_FLAGS option --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8bcba9cd..5ed8e078 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,11 @@ llvm-toolchain-7 (1:7.0.1~+rc3-2) UNRELEASED; urgency=medium One more time, thanks to Rebecca Palmer (Closes: #913946) * Force the chmod +x on llvm-X/bin/* because it was sometimes removed by the strip process - * Improved the debian/patches/series presentation by creating categories * Force the link to atomic also for i386 as it fails on Debian jessie too + * Improved the debian/patches/series presentation by creating categories + * Improve the separation between *FLAGS for gcc and clang. + This is done for -fno-addrsig as it doesn't exit for gcc + This can be done with the BOOTSTRAP_CMAKE_CXX_FLAGS option -- Sylvestre Ledru Mon, 10 Dec 2018 03:49:59 -0500 From 8ed2c3d96c87843fcec738f17e6ad541c43508a7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 12 Dec 2018 21:13:02 +0100 Subject: [PATCH 11/13] The goal is to provide correct debug packages. Workaround https://sourceware.org/bugzilla/show_bug.cgi?id=23788 --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5ed8e078..f60918ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ -llvm-toolchain-7 (1:7.0.1~+rc3-2) UNRELEASED; urgency=medium +llvm-toolchain-7 (1:7.0.1~+rc3-2) unstable; urgency=medium * Fix llvm-config by stripping unnecessary flags See also https://bugs.llvm.org/show_bug.cgi?id=8220 (Closes: #697755, #914838) * Try to workaround the debug issues by adding -fno-addrsig to the *FLAGS One more time, thanks to Rebecca Palmer (Closes: #913946) + The goal is to provide correct debug packages. + Workaround https://sourceware.org/bugzilla/show_bug.cgi?id=23788 * Force the chmod +x on llvm-X/bin/* because it was sometimes removed by the strip process * Force the link to atomic also for i386 as it fails on Debian jessie too From ee6846e207101c244460c52f4ef5f513d45ed8f1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 13 Dec 2018 09:47:44 +0100 Subject: [PATCH 12/13] missing declaration --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index 4c7769fa..3e3769b9 100755 --- a/debian/rules +++ b/debian/rules @@ -123,6 +123,7 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) endif endif +CODECOVERAGE=no ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) # enable the code coverage CODECOVERAGE=yes From afc5bd71f2753d09b8862015f1fdf073def41491 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 13 Dec 2018 15:35:42 +0100 Subject: [PATCH 13/13] verify that llvm-config doesn't export -W --- debian/qualify-clang.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 08e61353..b1d2d41f 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -28,6 +28,11 @@ if test ! -f /usr/lib/llvm-$VERSION/lib/libLLVM-$VERSION.so; then fi llvm-config-$VERSION --link-shared --libs &> /dev/null +if llvm-config-$VERSION --cxxflags | grep " \-W"; then + echo "llvm-config should not export -W warnings" + exit 1 +fi + echo '#include int main() { char *x = (char*)malloc(10 * sizeof(char*));