From eab48da666159a95584c86711352c64671994212 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 16 Dec 2018 13:09:41 +0100 Subject: [PATCH 01/25] New release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index f60918ab..705782ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-7 (1:7.0.1-1) unstable; urgency=medium + + * New release + + -- Sylvestre Ledru Sun, 16 Dec 2018 13:07:54 +0100 + llvm-toolchain-7 (1:7.0.1~+rc3-2) unstable; urgency=medium * Fix llvm-config by stripping unnecessary flags From 7dd264c6f600ffe4f2c7b80079f10a6851330597 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 16 Dec 2018 13:12:58 +0100 Subject: [PATCH 02/25] keep the strip workaround only for old version of bin utils --- debian/rules | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/debian/rules b/debian/rules index 3e3769b9..13673933 100755 --- a/debian/rules +++ b/debian/rules @@ -681,14 +681,8 @@ override_dh_installman: override_dh_strip: - : # Workaround some issues with stripping by using llvm's - if test ! -f $(CURDIR)/strip; then \ - ln -s $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/bin/llvm-strip $(CURDIR)/strip; \ - fi : # running out of diskspace on the buildds find $(TARGET_BUILD) -name '*.o' -o -name '*.a' -type f | xargs -r rm -f - # strip args in case we want to use llvm-strip - #PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ ifeq (0, $(strip $(shell dpkg --compare-versions $(DH_VERSION) ge 9.20160114; echo $$?))) : # If we don't have the right version of debhelper, don't run the option dh_strip -p libclang$(SONAME_EXT)-$(LLVM_VERSION) --dbgsym-migration='libclang$(SONAME_EXT)-$(LLVM_VERSION)-dbg (<< 1:7~svn327768-1~)' @@ -700,13 +694,18 @@ endif # PATH=$(CURDIR)/:$$PATH dh_strip -p liblld-$(LLVM_VERSION) --dbg-package=liblld-$(LLVM_VERSION)-dbg # endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.28 ; echo $$?),0) -# strip segfaults on libFuzzer.a - PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ dh_strip -a -v -XlibFuzzer.a -Xlibc++.a -Xlibc++abi.a -Xlibc++experimental.a -XlibclangTidyModernizeModule.a + : # Workaround some issues with stripping by using llvm's + if test ! -f $(CURDIR)/strip; then \ + ln -s $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/bin/llvm-strip $(CURDIR)/strip; \ + fi + : # strip segfaults on libFuzzer.a and other libs + PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot dh_strip -a -v -XlibFuzzer.a -Xlibc++.a -Xlibc++abi.a -Xlibc++experimental.a -XlibclangTidyModernizeModule.a + : # Remove the workaround + rm $(CURDIR)/strip else dh_strip -a -v 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 From 3c89d34e4c24974a87a15764217cf287e59377c3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 16 Dec 2018 13:14:04 +0100 Subject: [PATCH 03/25] remove the -fno-addrsig workaround --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 13673933..8922d700 100755 --- a/debian/rules +++ b/debian/rules @@ -136,9 +136,9 @@ 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 -BOOTSTRAP_CXXFLAGS_EXTRA = $(CXXFLAGS_EXTRA) -fno-addrsig +BOOTSTRAP_CXXFLAGS_EXTRA = $(CXXFLAGS_EXTRA) # Nothing for now. Keeping in case we need it CFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -BOOTSTRAP_CFLAGS_EXTRA = $(CFLAGS_EXTRA) -fno-addrsig +BOOTSTRAP_CFLAGS_EXTRA = $(CFLAGS_EXTRA) # Nothing for now. Keeping in case we need it # Enable polly (or not) POLLY_ENABLE=yes From c3dd861c373bf937a8a5632b808423fd60963053 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 16 Dec 2018 13:16:04 +0100 Subject: [PATCH 04/25] Remove the dbg workaround. Hopefully, the new version of binutils will fix it (Closes: #913946) --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 705782ec..36044aa8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ llvm-toolchain-7 (1:7.0.1-1) unstable; urgency=medium * New release + * Remove the dbg workaround. Hopefully, the new version of + binutils will fix it (Closes: #913946) -- Sylvestre Ledru Sun, 16 Dec 2018 13:07:54 +0100 From d6e4a307b04bdfcdccd80547405cc0b7f0990ac9 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 16 Dec 2018 15:55:55 +0100 Subject: [PATCH 05/25] fix the declaration --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 8922d700..dbacd079 100755 --- a/debian/rules +++ b/debian/rules @@ -693,7 +693,7 @@ endif # ifeq (${LLD_ENABLE},yes) # PATH=$(CURDIR)/:$$PATH dh_strip -p liblld-$(LLVM_VERSION) --dbg-package=liblld-$(LLVM_VERSION)-dbg # endif -ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.28 ; echo $$?),0) +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) lt 2.28 ; echo $$?),0) : # Workaround some issues with stripping by using llvm's if test ! -f $(CURDIR)/strip; then \ ln -s $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/bin/llvm-strip $(CURDIR)/strip; \ From 4c723333412936faa17a7ac02c47e4b50d3c5578 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 17 Dec 2018 11:01:30 +0100 Subject: [PATCH 06/25] remove a temp file --- debian/qualify-clang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index b1d2d41f..4d817bb0 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -167,7 +167,7 @@ if (1==1) { return 42; } return 0;}' > foo.c -rm foo +rm foo bar.cc if test ! -f /usr/lib/llvm-$VERSION/bin/../lib/LLVMgold.so; then echo "Install llvm-$VERSION-dev" From 4574aab59e4da2bb3d66bfa74175739b83982a55 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 17 Dec 2018 11:04:41 +0100 Subject: [PATCH 07/25] Enable more tests, just don't fail on them --- debian/qualify-clang.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 4d817bb0..1fbc80c9 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -76,7 +76,7 @@ void increment(atomic_size_t *arg) { atomic_fetch_add(arg, 1); } ' > foo.c -#clang-$VERSION -v -c foo.c +clang-$VERSION -v -c foo.c echo "#include " > foo.cc NBLINES=$(clang++-$VERSION -P -E foo.cc|wc -l) @@ -203,13 +203,13 @@ clang-$VERSION -O3 -fpic -c -o bar.o bar.c clang-$VERSION -fuse-ld=bfd -shared -o libfoo.so bar.o clang-$VERSION -fuse-ld=bfd -o y x.o libfoo.so -Wl,-R,. # Still failing, commenting -# ./y +./y || true clang-$VERSION -O3 -c -o x.o x.c clang-$VERSION -O3 -fpic -c -o bar.o bar.c clang-$VERSION -fuse-ld=gold -shared -o libfoo.so bar.o # Still failing, commenting -# clang-$VERSION -fuse-ld=gold -o y x.o libfoo.so -Wl,-R,. +clang-$VERSION -fuse-ld=gold -o y x.o libfoo.so -Wl,-R,. || true rm -f x.c bar.c libfoo.so bar.o y x.o From f0f0ba2c6c3b9ae3d6c822fbb2f9f969b6cfb849 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 20 Dec 2018 17:16:38 +0200 Subject: [PATCH 08/25] Fix -dbgsym creation - build with -g1 also on 64bit architectures - should be -g, but this causes buildd disk space issues - enable BuildID so that clang built binaries can be in -dbgsym - override_dh_strip: limit all workarounds to binutils < 2.31.1-11 --- debian/rules | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index dbacd079..60b914eb 100755 --- a/debian/rules +++ b/debian/rules @@ -73,6 +73,9 @@ 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 ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) @@ -360,11 +363,12 @@ override_dh_auto_configure: preconfigure -DLLVM_ENABLE_FFI=ON \ $(CMAKE_EXTRA) \ -DLIBCLANG_LIBRARY_VERSION=$(SONAME_EXT) \ + -DENABLE_LINKER_BUILD_ID=ON \ -DPOLLY_BUNDLED_JSONCPP=OFF \ -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;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;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" # make @@ -693,7 +697,7 @@ endif # ifeq (${LLD_ENABLE},yes) # PATH=$(CURDIR)/:$$PATH dh_strip -p liblld-$(LLVM_VERSION) --dbg-package=liblld-$(LLVM_VERSION)-dbg # endif -ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) lt 2.28 ; echo $$?),0) +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) lt 2.31.1-11 ; echo $$?),0) : # Workaround some issues with stripping by using llvm's if test ! -f $(CURDIR)/strip; then \ ln -s $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/bin/llvm-strip $(CURDIR)/strip; \ @@ -702,13 +706,12 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' bin PATH=$(CURDIR)/:$$PATH LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot dh_strip -a -v -XlibFuzzer.a -Xlibc++.a -Xlibc++abi.a -Xlibc++experimental.a -XlibclangTidyModernizeModule.a : # 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 else dh_strip -a -v endif - : # 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) ifeq (${POLLY_ENABLE},yes) From f72c848baaee421000f36b8fcd53cbe5019e428e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Dec 2018 08:25:28 +0100 Subject: [PATCH 09/25] Pass -Wl,--build-id to get dbgsym packages (Closes: #916975) --- debian/changelog | 6 ++++++ debian/rules | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 36044aa8..b29e0ac0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-7 (1:7.0.1-2) UNRELEASED; urgency=medium + + * Pass -Wl,--build-id to get dbgsym packages (Closes: #916975) + + -- Sylvestre Ledru Fri, 21 Dec 2018 08:24:20 +0100 + llvm-toolchain-7 (1:7.0.1-1) unstable; urgency=medium * New release diff --git a/debian/rules b/debian/rules index dbacd079..e3651543 100755 --- a/debian/rules +++ b/debian/rules @@ -134,7 +134,7 @@ ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) endif # Enable for bootstrap -LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option +LDFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option -Wl,--build-id CXXFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option BOOTSTRAP_CXXFLAGS_EXTRA = $(CXXFLAGS_EXTRA) # Nothing for now. Keeping in case we need it CFLAGS_EXTRA += -fPIC -Wno-unused-command-line-argument -Wno-unknown-warning-option From b9b61aeece0c545b54841a1bb0997314ca8f2385 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Dec 2018 17:08:14 +0100 Subject: [PATCH 10/25] Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled by default in clang. Once more, thanks to Rebecca Palmer (Closes: #916975) --- debian/changelog | 10 +++++++++- debian/rules | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 36044aa8..0f60031a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,15 @@ +llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium + + * Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled + by default in clang. + Once more, thanks to Rebecca Palmer (Closes: #916975) + + -- Sylvestre Ledru Fri, 21 Dec 2018 17:07:44 +0100 + llvm-toolchain-7 (1:7.0.1-1) unstable; urgency=medium * New release - * Remove the dbg workaround. Hopefully, the new version of + * Remove the dbg workaround. Hopefully, the new version of binutils will fix it (Closes: #913946) -- Sylvestre Ledru Sun, 16 Dec 2018 13:07:54 +0100 diff --git a/debian/rules b/debian/rules index dbacd079..004484b2 100755 --- a/debian/rules +++ b/debian/rules @@ -363,6 +363,7 @@ override_dh_auto_configure: preconfigure -DPOLLY_BUNDLED_JSONCPP=OFF \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly;AVR" \ -DCLANG_ENABLE_BOOTSTRAP=ON \ + -DENABLE_LINKER_BUILD_ID:BOOL=ON \ -DCLANG_VENDOR=$(VENDOR) \ -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" From 90e5dc22a451a22ca0c4a52e3539e5465f9d22ef Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Dec 2018 20:48:06 +0100 Subject: [PATCH 11/25] Revert "Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled by default in clang. Once more, thanks to Rebecca Palmer (Closes: #916975)" This reverts commit b9b61aeece0c545b54841a1bb0997314ca8f2385. --- debian/changelog | 10 +--------- debian/rules | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0f60031a..36044aa8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,15 +1,7 @@ -llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium - - * Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled - by default in clang. - Once more, thanks to Rebecca Palmer (Closes: #916975) - - -- Sylvestre Ledru Fri, 21 Dec 2018 17:07:44 +0100 - llvm-toolchain-7 (1:7.0.1-1) unstable; urgency=medium * New release - * Remove the dbg workaround. Hopefully, the new version of + * Remove the dbg workaround. Hopefully, the new version of binutils will fix it (Closes: #913946) -- Sylvestre Ledru Sun, 16 Dec 2018 13:07:54 +0100 diff --git a/debian/rules b/debian/rules index 004484b2..dbacd079 100755 --- a/debian/rules +++ b/debian/rules @@ -363,7 +363,6 @@ override_dh_auto_configure: preconfigure -DPOLLY_BUNDLED_JSONCPP=OFF \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly;AVR" \ -DCLANG_ENABLE_BOOTSTRAP=ON \ - -DENABLE_LINKER_BUILD_ID:BOOL=ON \ -DCLANG_VENDOR=$(VENDOR) \ -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" From 5acdfc0423c5b303865bfd2f3c04d4d1f7ff683d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Dec 2018 20:49:26 +0100 Subject: [PATCH 12/25] Revert "Revert "Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled by default in clang. Once more, thanks to Rebecca Palmer (Closes: #916975)"" This reverts commit 90e5dc22a451a22ca0c4a52e3539e5465f9d22ef. --- debian/changelog | 10 +++++++++- debian/rules | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 36044aa8..0f60031a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,15 @@ +llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium + + * Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled + by default in clang. + Once more, thanks to Rebecca Palmer (Closes: #916975) + + -- Sylvestre Ledru Fri, 21 Dec 2018 17:07:44 +0100 + llvm-toolchain-7 (1:7.0.1-1) unstable; urgency=medium * New release - * Remove the dbg workaround. Hopefully, the new version of + * Remove the dbg workaround. Hopefully, the new version of binutils will fix it (Closes: #913946) -- Sylvestre Ledru Sun, 16 Dec 2018 13:07:54 +0100 diff --git a/debian/rules b/debian/rules index 60b914eb..98f7ec63 100755 --- a/debian/rules +++ b/debian/rules @@ -367,6 +367,7 @@ override_dh_auto_configure: preconfigure -DPOLLY_BUNDLED_JSONCPP=OFF \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly;AVR" \ -DCLANG_ENABLE_BOOTSTRAP=ON \ + -DENABLE_LINKER_BUILD_ID:BOOL=ON \ -DCLANG_VENDOR=$(VENDOR) \ -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" From a7324bb040c7397d08a7968cb878093e7b0cc9f4 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Dec 2018 20:50:25 +0100 Subject: [PATCH 13/25] add the changelog --- debian/changelog | 2 +- debian/rules | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0f60031a..eb39d048 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium * Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled - by default in clang. + by default in clang. Thanks to Adrian Bunk for the patch. Once more, thanks to Rebecca Palmer (Closes: #916975) -- Sylvestre Ledru Fri, 21 Dec 2018 17:07:44 +0100 diff --git a/debian/rules b/debian/rules index 98f7ec63..60b914eb 100755 --- a/debian/rules +++ b/debian/rules @@ -367,7 +367,6 @@ override_dh_auto_configure: preconfigure -DPOLLY_BUNDLED_JSONCPP=OFF \ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly;AVR" \ -DCLANG_ENABLE_BOOTSTRAP=ON \ - -DENABLE_LINKER_BUILD_ID:BOOL=ON \ -DCLANG_VENDOR=$(VENDOR) \ -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" From 26ea04bc08575128570826d70fe91901352c9282 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 21 Dec 2018 20:50:56 +0100 Subject: [PATCH 14/25] Build with -g1 also on 64bit architectures (thanks to Adrian too) --- debian/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index eb39d048..a8b4b48b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium * Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled by default in clang. Thanks to Adrian Bunk for the patch. Once more, thanks to Rebecca Palmer (Closes: #916975) + * Build with -g1 also on 64bit architectures (thanks to Adrian too) -- Sylvestre Ledru Fri, 21 Dec 2018 17:07:44 +0100 From 2416269467faa2810443ac43566fcececb450b5d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 22 Dec 2018 00:01:00 +0100 Subject: [PATCH 15/25] consistency in the clang name --- debian/control | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/control b/debian/control index aca8ea5d..a1baf8cd 100644 --- a/debian/control +++ b/debian/control @@ -104,7 +104,7 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same -Description: C interface to the clang library +Description: C interface to the Clang library 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 GNU Compiler Collection (GCC). @@ -112,7 +112,7 @@ Description: C interface to the clang library Clang implements all of the ISO C++ 1998, 11 and 14 standards and also provides most of the support of C++17. . - This package contains the clang library. + This package contains the Clang library. . The C Interface to Clang provides a relatively small API that exposes facilities for parsing source code into an abstract syntax tree (AST), @@ -126,7 +126,7 @@ Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, ${dep:devlibs-objc}, libclang1-7 (= ${binary:Version}), libclang-common-7-dev (= ${binary:Version}) -Description: clang library - Development package +Description: Clang library - Development package 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 GNU Compiler Collection (GCC). @@ -134,14 +134,14 @@ Description: clang library - Development package Clang implements all of the ISO C++ 1998, 11 and 14 standards and also provides most of the support of C++17. . - This package contains the clang headers to develop extensions over + This package contains the Clang headers to develop extensions over libclang1-7. Package: libclang-common-7-dev Architecture: any Section: libdevel Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}) -Description: clang library - Common development package +Description: Clang library - Common development package 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 GNU Compiler Collection (GCC). @@ -149,7 +149,7 @@ Description: clang library - Common development package Clang implements all of the ISO C++ 1998, 11 and 14 standards and also provides most of the support of C++17. . - This package contains the clang generic headers and some libraries + This package contains the Clang generic headers and some libraries (profiling, etc). @@ -205,7 +205,7 @@ Description: Clang examples Clang implements all of the ISO C++ 1998, 11 and 14 standards and also provides most of the support of C++17. . - This package contains the clang examples. + This package contains the Clang examples. # ------------- LLVM ------------- From a314e76e19515891db535ba42cebca9ae7d5d7a3 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 22 Dec 2018 00:01:56 +0100 Subject: [PATCH 16/25] add tests for the dbg & buildid issue --- debian/qualify-clang.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 1fbc80c9..74d96f5e 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -8,7 +8,7 @@ fi VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p") -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb" +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo dpkg -i $LIST" L="" @@ -234,6 +234,21 @@ clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo ./foo > /dev/null +# Bug 916975 +file foo &> foo.log +if ! grep -q "BuildID" foo.log; then + echo "BuildID isn't part of the generated binary (lld generation)" + exit 1 +fi +# Bug 916975 +clang-$VERSION -O2 foo.c main.c -o foo2 +file foo2 &> foo2.log +if ! grep "BuildID" foo2.log; then + echo "BuildID isn't part of the generated binary (ld generation)" + exit 1 +fi + + cat << EOF > test_fuzzer.cc #include #include @@ -609,8 +624,20 @@ if test ! -f /usr/bin/lldb-$VERSION; then exit -1; fi - +# bug 913946 lldb-$VERSION -s lldb-cmd.txt bar +if dpkg -l|grep -q clang-$VERSION-dbgsym; then + # Testing if clang dbg symbol are here + lldb-$VERSION -s lldb-cmd.txt clang-$VERSION &> foo.log + if ! grep "main at driver.cpp" foo.log; then + echo "Could not find the debug info" + echo "Or the main() of clang isn't in driver.cpp anymore" + exit -1 + fi +else + echo "clang-$VERSION-dbgsym isn't installed" +fi + echo ' #include int main (void) From a2cde1ab59a9943c932154fc15510460b7a9205b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 22 Dec 2018 00:01:56 +0100 Subject: [PATCH 17/25] add tests for the dbg & buildid issue --- debian/qualify-clang.sh | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 1fbc80c9..710cae55 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -8,7 +8,7 @@ fi VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9]+).*,\1,p") DETAILED_VERSION=$(dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\1\2\3,p") -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb" +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}-dbgsym_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo dpkg -i $LIST" L="" @@ -234,6 +234,27 @@ clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo ./foo > /dev/null +# Bug 916975 +file foo &> foo.log +if ! grep -q "BuildID" foo.log; then + echo "BuildID isn't part of the generated binary (lld generation)" + exit 1 +fi +# Bug 916975 +clang-$VERSION -O2 foo.c main.c -o foo2 +file foo2 &> foo2.log +if ! grep "BuildID" foo2.log; then + echo "BuildID isn't part of the generated binary (ld generation)" + exit 1 +fi +strip foo2 +file foo2 &> foo2.log +if ! grep "BuildID" foo2.log; then + echo "BuildID isn't part of the generated binary (stripped)" + exit 1 +fi +rm foo2 foo2.log + cat << EOF > test_fuzzer.cc #include #include @@ -609,8 +630,20 @@ if test ! -f /usr/bin/lldb-$VERSION; then exit -1; fi - +# bug 913946 lldb-$VERSION -s lldb-cmd.txt bar +if dpkg -l|grep -q clang-$VERSION-dbgsym; then + # Testing if clang dbg symbol are here + lldb-$VERSION -s lldb-cmd.txt clang-$VERSION &> foo.log + if ! grep "main at driver.cpp" foo.log; then + echo "Could not find the debug info" + echo "Or the main() of clang isn't in driver.cpp anymore" + exit -1 + fi +else + echo "clang-$VERSION-dbgsym isn't installed" +fi + echo ' #include int main (void) From c77a496667331166a3a26007044c70c215a7011c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 22 Dec 2018 21:23:44 +0100 Subject: [PATCH 18/25] Also install clang-7-dbgsym libclang1-7-dbgsym in autopkgtest to verify that debug symbols are present --- debian/changelog | 7 +++++++ debian/prepare-new-release.sh | 2 +- debian/tests/control | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a8b4b48b..6a2fb94c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-7 (1:7.0.1-3) unstable; urgency=medium + + * Also install clang-7-dbgsym libclang1-7-dbgsym in autopkgtest + to verify that debug symbols are present + + -- Sylvestre Ledru Sat, 22 Dec 2018 21:23:36 +0100 + llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium * Enable -DENABLE_LINKER_BUILD_ID:BOOL=ON as, unlike gcc, isn't enabled diff --git a/debian/prepare-new-release.sh b/debian/prepare-new-release.sh index 432f8144..a0db4e9d 100644 --- a/debian/prepare-new-release.sh +++ b/debian/prepare-new-release.sh @@ -6,7 +6,7 @@ TARGET_VERSION_2=7_0 ORIG_VERSION_3=60 TARGET_VERSION_3=70 -LIST=`ls debian/control debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch debian/patches/clang-tidy-run-bin.diff debian/patches/clang-apply-replacements.diff debian/patches/fix-scan-view-path.diff debian/qualify-clang.sh debian/README` +LIST=`ls debian/control debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch debian/patches/clang-tidy-run-bin.diff debian/patches/clang-apply-replacements.diff debian/patches/fix-scan-view-path.diff debian/qualify-clang.sh debian/README debian/tests/control` for F in $LIST; do sed -i -e "s|$ORIG_VERSION_3|$TARGET_VERSION_3|g" $F sed -i -e "s|$ORIG_VERSION_2|$TARGET_VERSION_2|g" $F diff --git a/debian/tests/control b/debian/tests/control index 9ef42f09..b4c8ea98 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ Test-Command: bash -v ./debian/qualify-clang.sh -Depends: @, cmake, g++, file +Depends: @, cmake, g++, file, clang-7-dbgsym, libclang1-7-dbgsym Restrictions: allow-stderr From 61441bd1270aa885d9942b72d7bdc2f1ef26992d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Dec 2018 12:24:30 +0100 Subject: [PATCH 19/25] Cherry-pick upstream fix D52340 to address a rustc debuginfo (Closes: #917209) --- debian/changelog | 4 ++- debian/patches/D52340-rustc-debuginfo.diff | 32 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 debian/patches/D52340-rustc-debuginfo.diff diff --git a/debian/changelog b/debian/changelog index 6a2fb94c..5cbedeae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ llvm-toolchain-7 (1:7.0.1-3) unstable; urgency=medium * Also install clang-7-dbgsym libclang1-7-dbgsym in autopkgtest to verify that debug symbols are present + * Cherry-pick upstream fix D52340 to address a rustc debuginfo + (Closes: #917209) - -- Sylvestre Ledru Sat, 22 Dec 2018 21:23:36 +0100 + -- Sylvestre Ledru Wed, 26 Dec 2018 12:24:01 +0100 llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium diff --git a/debian/patches/D52340-rustc-debuginfo.diff b/debian/patches/D52340-rustc-debuginfo.diff new file mode 100644 index 00000000..a9e9a33b --- /dev/null +++ b/debian/patches/D52340-rustc-debuginfo.diff @@ -0,0 +1,32 @@ +Index: llvm/lib/Bitcode/Reader/MetadataLoader.cpp +=================================================================== +--- llvm.orig/lib/Bitcode/Reader/MetadataLoader.cpp ++++ llvm/lib/Bitcode/Reader/MetadataLoader.cpp +@@ -1313,7 +1313,7 @@ + (Context, Tag, Name, File, Line, Scope, BaseType, + SizeInBits, AlignInBits, OffsetInBits, Flags, + Elements, RuntimeLang, VTableHolder, TemplateParams, +- Identifier)); ++ Identifier, Discriminator)); + if (!IsNotUsedInTypeRef && Identifier) + MetadataList.addTypeRef(*Identifier, *cast(CT)); + +Index: llvm/test/Assembler/debug-variant-discriminator.ll +=================================================================== +--- llvm.orig/test/Assembler/debug-variant-discriminator.ll ++++ llvm/test/Assembler/debug-variant-discriminator.ll +@@ -0,0 +1,14 @@ ++; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s ++; RUN: verify-uselistorder %s ++ ++; CHECK: !named = !{!0, !1, !2} ++!named = !{!0, !1, !2} ++ ++; CHECK: !0 = !DICompositeType(tag: DW_TAG_structure_type, name: "Outer", size: 64, align: 64, identifier: "Outer") ++; CHECK-NEXT: !1 = !DICompositeType(tag: DW_TAG_variant_part, scope: !0, size: 64, discriminator: !2) ++; CHECK-NEXT: !2 = !DIDerivedType(tag: DW_TAG_member, scope: !1, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial) ++; CHECK-NEXT: !3 = !DIBasicType(name: "u64", size: 64, encoding: DW_ATE_unsigned) ++!0 = !DICompositeType(tag: DW_TAG_structure_type, name: "Outer", size: 64, align: 64, identifier: "Outer") ++!1 = !DICompositeType(tag: DW_TAG_variant_part, scope: !0, size: 64, discriminator: !2) ++!2 = !DIDerivedType(tag: DW_TAG_member, scope: !1, baseType: !3, size: 64, align: 64, flags: DIFlagArtificial) ++!3 = !DIBasicType(name: "u64", size: 64, encoding: DW_ATE_unsigned) diff --git a/debian/patches/series b/debian/patches/series index a620afa6..7f6e380f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -132,3 +132,4 @@ powerpcspe-add-missing-include-path.diff D49754-powerpcspe-clang.diff D54409-powerpcspe-register-spilling.diff D54584-powerpcspe-double-parameter.diff +D52340-rustc-debuginfo.diff From d4981f0ad40393f289da596cc3269685d9241116 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Dec 2018 18:59:28 +0100 Subject: [PATCH 20/25] Change the jit debug path from $HOME/.debug/jit/ to $TMPDIR/.debug/jit/ (Closes: #916393) --- debian/changelog | 2 ++ debian/patches/debug-jit-path.diff | 15 +++++++++++++++ debian/patches/series | 2 ++ 3 files changed, 19 insertions(+) create mode 100644 debian/patches/debug-jit-path.diff diff --git a/debian/changelog b/debian/changelog index 5cbedeae..27179295 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ llvm-toolchain-7 (1:7.0.1-3) unstable; urgency=medium to verify that debug symbols are present * Cherry-pick upstream fix D52340 to address a rustc debuginfo (Closes: #917209) + * Change the jit debug path from $HOME/.debug/jit/ to + $TMPDIR/.debug/jit/ (Closes: #916393) -- Sylvestre Ledru Wed, 26 Dec 2018 12:24:01 +0100 diff --git a/debian/patches/debug-jit-path.diff b/debian/patches/debug-jit-path.diff new file mode 100644 index 00000000..78dc89aa --- /dev/null +++ b/debian/patches/debug-jit-path.diff @@ -0,0 +1,15 @@ +Index: llvm-toolchain-7_7.0.1~+rc3/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp +=================================================================== +--- llvm-toolchain-7_7.0.1~+rc3.orig/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp ++++ llvm-toolchain-7_7.0.1~+rc3/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp +@@ -294,8 +294,8 @@ bool PerfJITEventListener::InitDebugging + // search for location to dump data to + if (const char *BaseDir = getenv("JITDUMPDIR")) + Path.append(BaseDir); +- else if (!sys::path::home_directory(Path)) +- Path = "."; ++ else ++ sys::path::system_temp_directory(/*ErasedOnReboot*/ true, Path); + + // create debug directory + Path += "/.debug/jit/"; diff --git a/debian/patches/series b/debian/patches/series index 7f6e380f..e413cce7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,6 +20,7 @@ x32-fix-driver-search-paths.diff symbolizer-path.diff clang-tidy-run-bin.diff 0001-tools-clang-cmake-resolve-symlinks-in-ClangConfig.cmake.patch +debug-jit-path.diff # commented because of bug 903709 #force-gcc-header-obj.diff @@ -133,3 +134,4 @@ D49754-powerpcspe-clang.diff D54409-powerpcspe-register-spilling.diff D54584-powerpcspe-double-parameter.diff D52340-rustc-debuginfo.diff + From bfb7a606178e0e8a18ab8f7b87f3b7ef25c85280 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Dec 2018 22:57:22 +0100 Subject: [PATCH 21/25] Document in README.source some Debian/Ubuntu specific changes --- debian/README.source | 33 +++++++++++++++++++++++++++++++-- debian/changelog | 3 ++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/debian/README.source b/debian/README.source index deeb3f28..7447abac 100644 --- a/debian/README.source +++ b/debian/README.source @@ -1,5 +1,34 @@ +All programs and libraries shipped in this package are trying to stay as close +as possible from upstream. -Repack of the snapshot release are done with orig-tar.sh which will checkout the sources. +However, because of the objectives of Debian, besides paths, some changes are +made. - -- Sylvestre Ledru , Tue, 26 Feb 2013 14:57:56 +0100 += File names = + +* To make sure that most of the llvm-toolchain packages are co-installable, +files are installed in /usr/lib/llvm-X/ +and symlinks are managed by the other package llvm-defaults + + += CPU extensions = + +* For x86, SSE2 extensions are disabled (and the target CPU is i686 instead of + pentium4. + +* For armel, uses float ABI instead of hard. + +* For armv7-a, NEON extensions are disabled. + +* For mips, FPXX is enabled. + + += Libraries = + +* sonames are created + +* Build-ID are enabled + + + -- Sylvestre Ledru , Wed, 26 Dec 2018 22:56:30 +0100 diff --git a/debian/changelog b/debian/changelog index 27179295..278679e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ llvm-toolchain-7 (1:7.0.1-3) unstable; urgency=medium (Closes: #917209) * Change the jit debug path from $HOME/.debug/jit/ to $TMPDIR/.debug/jit/ (Closes: #916393) + * Document in README.source some Debian/Ubuntu specific changes - -- Sylvestre Ledru Wed, 26 Dec 2018 12:24:01 +0100 + -- Sylvestre Ledru Wed, 26 Dec 2018 22:57:45 +0100 llvm-toolchain-7 (1:7.0.1-2) unstable; urgency=medium From 6a86d1bc84266c587a679e090ed7c77694120b4d Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Dec 2018 23:56:50 +0100 Subject: [PATCH 22/25] remove old patch --- debian/patches/bootstrap-polly-fpic.diff | 35 -------------- debian/patches/bug-30342.diff | 0 ...clang-fix-cmpxchg8-detection-on-i386.patch | 46 ------------------- 3 files changed, 81 deletions(-) delete mode 100644 debian/patches/bootstrap-polly-fpic.diff delete mode 100644 debian/patches/bug-30342.diff delete mode 100644 debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch diff --git a/debian/patches/bootstrap-polly-fpic.diff b/debian/patches/bootstrap-polly-fpic.diff deleted file mode 100644 index ab93a8a3..00000000 --- a/debian/patches/bootstrap-polly-fpic.diff +++ /dev/null @@ -1,35 +0,0 @@ -Index: llvm-toolchain-7-7/polly/CMakeLists.txt -=================================================================== ---- llvm-toolchain-7-7.orig/polly/CMakeLists.txt -+++ llvm-toolchain-7-7/polly/CMakeLists.txt -@@ -91,6 +91,8 @@ else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") - endif () - -+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -+ - # Add path for custom modules - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${POLLY_SOURCE_DIR}/cmake") - -Index: llvm-toolchain-7-7/polly/lib/External/CMakeLists.txt -=================================================================== ---- llvm-toolchain-7-7.orig/polly/lib/External/CMakeLists.txt -+++ llvm-toolchain-7-7/polly/lib/External/CMakeLists.txt -@@ -1,3 +1,6 @@ -+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") -+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -+ - # External: Integer Set Library - if (POLLY_BUNDLED_ISL) - set(ISL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/isl") -Index: llvm-toolchain-7-7/lib/Support/CMakeLists.txt -=================================================================== ---- llvm-toolchain-7-7.orig/lib/Support/CMakeLists.txt -+++ llvm-toolchain-7-7/lib/Support/CMakeLists.txt -@@ -1,4 +1,6 @@ - set(system_libs) -+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") -+ - if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ ) - set(system_libs ${system_libs} ${ZLIB_LIBRARIES}) - endif() diff --git a/debian/patches/bug-30342.diff b/debian/patches/bug-30342.diff deleted file mode 100644 index e69de29b..00000000 diff --git a/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch b/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch deleted file mode 100644 index eab2a4a0..00000000 --- a/debian/patches/clang-fix-cmpxchg8-detection-on-i386.patch +++ /dev/null @@ -1,46 +0,0 @@ -libcxx atomic tests for old i386 fail with wrong Atomic inline width. -cmpxchg8b instruction is required for 8 byte atomics that clang was -assuming. - -Too bad _GCC_ATOMIC_LLONG_LOCK_FREE 2 isn't supported even with this change -because llvm doesn't support unaligned atomic compare and exchange operation. -Fallback calls to libatomic.so should handle long long lock free but clang -can't tell program if libatomic is always lock free. - -Related bug: https://llvm.org/bugs/show_bug.cgi?id=19355 - -Index: llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.cpp -=================================================================== ---- llvm-toolchain-snapshot_6.0~svn309319.orig/clang/lib/Basic/Targets/X86.cpp -+++ llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.cpp -@@ -1133,7 +1133,7 @@ void X86TargetInfo::getTargetDefines(con - Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2"); - Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4"); - } -- if (CPU >= CK_i586) -+ if (isCmpXChg8Supported()) - Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8"); - - if (HasFloat128) -Index: llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.h -=================================================================== ---- llvm-toolchain-snapshot_6.0~svn309319.orig/clang/lib/Basic/Targets/X86.h -+++ llvm-toolchain-snapshot_6.0~svn309319/clang/lib/Basic/Targets/X86.h -@@ -281,6 +281,8 @@ class LLVM_LIBRARY_VISIBILITY X86TargetI - // acceptable. - // FIXME: This results in terrible diagnostics. Clang just says the CPU is - // invalid without explaining *why*. -+ if (!isCmpXChg8Supported()) -+ MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32; - switch (Kind) { - case CK_Generic: - // No processor selected! -@@ -548,8 +550,6 @@ public: - (1 << TargetInfo::LongDouble)); - - // x86-32 has atomics up to 8 bytes -- // FIXME: Check that we actually have cmpxchg8b before setting -- // MaxAtomicInlineWidth. (cmpxchg8b is an i586 instruction.) - MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; - } - From 89f9fb91e74cfd8e9c1047469fef98162a97b1d6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Dec 2018 23:57:03 +0100 Subject: [PATCH 23/25] fix a typo in the patch --- debian/patches/bootstrap-fix-include-next.diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/bootstrap-fix-include-next.diff b/debian/patches/bootstrap-fix-include-next.diff index ee9dc9e4..87514b5c 100644 --- a/debian/patches/bootstrap-fix-include-next.diff +++ b/debian/patches/bootstrap-fix-include-next.diff @@ -10,7 +10,7 @@ include_next to get the glibc (libc6-dev package) header. However, in the previous example, because we have inttypes.h twice in the include search path, clang's header will call itself without any effect. -Therefor, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H) +Therefore, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H) Index: llvm-toolchain-7-7/clang/lib/Headers/inttypes.h From b5c74fb45b4d9b2dca24791d9601c85bc81cee42 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Dec 2018 00:03:34 +0100 Subject: [PATCH 24/25] remove old patch --- .../patches/fix-include-next-bootstrap.diff | 41 ----------- debian/patches/fix-lldb-server-build | 73 ------------------- debian/patches/install-lldb-sb-headers.patch | 58 --------------- 3 files changed, 172 deletions(-) delete mode 100644 debian/patches/fix-include-next-bootstrap.diff delete mode 100644 debian/patches/fix-lldb-server-build delete mode 100644 debian/patches/install-lldb-sb-headers.patch diff --git a/debian/patches/fix-include-next-bootstrap.diff b/debian/patches/fix-include-next-bootstrap.diff deleted file mode 100644 index 0ad00550..00000000 --- a/debian/patches/fix-include-next-bootstrap.diff +++ /dev/null @@ -1,41 +0,0 @@ -When doing a bootstrap, we use a newly built clang. -When this one is used, if already installed on the system, -we have clang header in two places: -llvm-toolchain-7-7/build-llvm/lib/clang/7.0.0/include/inttypes.h -and -/usr/include/clang/7.0.0/include/inttypes.h - -Because clang expects only one of his headers to be available, it uses -include_next to get the glibc (libc6-dev package) header. - -However, in the previous example, because we have inttypes.h twice in the -include search path, clang's header will call itself without any effect. -Therefor, it will do include_next until the define from the libc is existing (ex: _INTTYPES_H) - - -Index: llvm-toolchain-7-7/clang/lib/Headers/inttypes.h -=================================================================== ---- llvm-toolchain-7-7.orig/clang/lib/Headers/inttypes.h -+++ llvm-toolchain-7-7/clang/lib/Headers/inttypes.h -@@ -20,7 +20,7 @@ - * - \*===----------------------------------------------------------------------===*/ - --#ifndef __CLANG_INTTYPES_H -+#if !defined(__CLANG_INTTYPES_H) || !defined(_INTTYPES_H) - #define __CLANG_INTTYPES_H - - #if defined(_MSC_VER) && _MSC_VER < 1800 -Index: llvm-toolchain-7-7/clang/lib/Headers/limits.h -=================================================================== ---- llvm-toolchain-7-7.orig/clang/lib/Headers/limits.h -+++ llvm-toolchain-7-7/clang/lib/Headers/limits.h -@@ -22,7 +22,7 @@ - * - \*===----------------------------------------------------------------------===*/ - --#ifndef __CLANG_LIMITS_H -+#if !defined(__CLANG_LIMITS_H) || !defined(_LIBC_LIMITS_H_) - #define __CLANG_LIMITS_H - - /* The system's limits.h may, in turn, try to #include_next GCC's limits.h. diff --git a/debian/patches/fix-lldb-server-build b/debian/patches/fix-lldb-server-build deleted file mode 100644 index c9f92d4d..00000000 --- a/debian/patches/fix-lldb-server-build +++ /dev/null @@ -1,73 +0,0 @@ ---- - cmake/modules/AddLLVM.cmake | 2 - - polly/lib/CMakeLists.txt | 47 +++++++++++++++++--------------------------- - 2 files changed, 20 insertions(+), 29 deletions(-) - ---- a/cmake/modules/AddLLVM.cmake -+++ b/cmake/modules/AddLLVM.cmake -@@ -501,7 +501,7 @@ function(llvm_add_library name) - # On DLL platforms symbols are imported from the tool by linking against it. - set(llvm_libs ${ARG_PLUGIN_TOOL}) - elseif (DEFINED LLVM_LINK_COMPONENTS OR DEFINED ARG_LINK_COMPONENTS) -- if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) -+ if (NOT ARG_STATIC AND LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB) - set(llvm_libs LLVM) - else() - llvm_map_components_to_libnames(llvm_libs ---- a/polly/lib/CMakeLists.txt -+++ b/polly/lib/CMakeLists.txt -@@ -66,35 +66,26 @@ endif (GPU_CODEGEN) - - target_link_libraries(Polly PollyISL jsoncpp) - --if (BUILD_SHARED_LIBS) -- target_link_libraries(Polly -- LLVMSupport -- LLVMCore -- LLVMScalarOpts -- LLVMInstCombine -- LLVMTransformUtils -- LLVMAnalysis -- LLVMipo -- LLVMMC -+target_link_libraries(Polly -+ LLVMSupport -+ LLVMCore -+ LLVMScalarOpts -+ LLVMInstCombine -+ LLVMTransformUtils -+ LLVMAnalysis -+ LLVMipo -+ LLVMMC - # The libraries below are required for darwin: http://PR26392 -- LLVMBitReader -- LLVMMCParser -- LLVMObject -- LLVMProfileData -- LLVMTarget -- LLVMVectorize -- ) -- link_directories( -- ${LLVM_LIBRARY_DIR} -- ) --elseif (LLVM_LINK_LLVM_DYLIB) -- target_link_libraries(Polly -- LLVM -- ) -- link_directories( -- ${LLVM_LIBRARY_DIR} -- ) --endif() -+ LLVMBitReader -+ LLVMMCParser -+ LLVMObject -+ LLVMProfileData -+ LLVMTarget -+ LLVMVectorize -+) -+link_directories( -+ ${LLVM_LIBRARY_DIR} -+) - - # Build a monolithic Polly.a and a thin module LLVMPolly.moduleext that links to - # that static library. diff --git a/debian/patches/install-lldb-sb-headers.patch b/debian/patches/install-lldb-sb-headers.patch deleted file mode 100644 index a1ee4364..00000000 --- a/debian/patches/install-lldb-sb-headers.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8f577000b2fe2f5bf5d08e352a2f15f9421f9c82 Mon Sep 17 00:00:00 2001 -From: Pavel Labath -Date: Thu, 8 Mar 2018 15:52:46 +0000 -Subject: [PATCH] Install lldb's SB headers (pr36630) - -These were removed in r309021 in what looks like an accidentally -committed change. This brings them back. - -I also rename the header component to lldb-headers (instead of -lldb_headers) to match the llvm style and add a special -install-lldb-headers target, which installs just the headers. - -git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@327016 91177308-0d34-0410-b5e6-96231b3b80d8 -Origin: upstream, https://github.com/llvm-mirror/lldb/commit/8f577000b2fe2f5bf5d08e352a2f15f9421f9c82.patch -Bug-Ubuntu: https://launchpad.net/bugs/1761009 -Forwarded: will be done by Nishanth Aravamudan -Last-Update: 2018-04-05 - ---- llvm-toolchain-6.0-6.0.orig/lldb/cmake/modules/LLDBConfig.cmake -+++ llvm-toolchain-6.0-6.0/lldb/cmake/modules/LLDBConfig.cmake -@@ -277,27 +277,31 @@ include_directories(BEFORE - - if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - install(DIRECTORY include/ -- COMPONENT lldb_headers -+ COMPONENT lldb-headers - DESTINATION include - FILES_MATCHING - PATTERN "*.h" - PATTERN ".svn" EXCLUDE - PATTERN ".cmake" EXCLUDE - PATTERN "Config.h" EXCLUDE -- PATTERN "lldb-*.h" EXCLUDE -- PATTERN "API/*.h" EXCLUDE - ) - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ -- COMPONENT lldb_headers -+ COMPONENT lldb-headers - DESTINATION include - FILES_MATCHING - PATTERN "*.h" - PATTERN ".svn" EXCLUDE - PATTERN ".cmake" EXCLUDE -- PATTERN "lldb-*.h" EXCLUDE -- PATTERN "API/*.h" EXCLUDE - ) -+ -+ add_custom_target(lldb-headers) -+ set_target_properties(lldb-headers PROPERTIES FOLDER "Misc") -+ -+ if (NOT CMAKE_CONFIGURATION_TYPES) -+ add_llvm_install_targets(install-lldb-headers -+ COMPONENT lldb-headers) -+ endif() - endif() - - if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows")) From 0d75b604535f575e05f54ab28decd0c0dcf709b5 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Dec 2018 00:12:04 +0100 Subject: [PATCH 25/25] fix some typos --- debian/changelog | 8 ++++---- .../lldb-addversion-suffix-to-llvm-server-exec.patch | 2 +- debian/patches/series | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 278679e0..b1398dc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -123,7 +123,7 @@ llvm-toolchain-7 (1:7.0.1~+rc2-3) unstable; urgency=medium * Disable gold for sparc* (Closes: #913260) * Hide a symbol in openmp for mips64el - * Try to integrate a pach to make pch reproducible + * Try to integrate a patch to make pch reproducible Thanks to Rebecca Palmer for the patch (Closes: #877359) * Fix the misscompilation issue causing rustc to crash (Closes: #913271) @@ -186,7 +186,7 @@ llvm-toolchain-7 (1:7-8) unstable; urgency=medium (Closes: #909705) * Add tests from old bugs to make sure they don't come back (Closes: #889832, #827866) - * The sanitizers use the versionned llvm-symbolizer provided by the + * The sanitizers use the versioned llvm-symbolizer provided by the llvm-X package (Closes: #753572) -- Sylvestre Ledru Sat, 20 Oct 2018 16:00:58 +0200 @@ -207,7 +207,7 @@ llvm-toolchain-7 (1:7-7~exp2) experimental; urgency=medium (Closes: #909705) * Add tests from old bugs to make sure they don't come back (Closes: #889832, #827866) - * The sanitizers use the versionned llvm-symbolizer provided by the + * The sanitizers use the versioned llvm-symbolizer provided by the llvm-X package (Closes: #753572) -- Sylvestre Ledru Sun, 21 Oct 2018 18:34:20 +0200 @@ -215,7 +215,7 @@ llvm-toolchain-7 (1:7-7~exp2) experimental; urgency=medium llvm-toolchain-7 (1:7-7~exp1) experimental; urgency=medium * Experiment the clang bootstrap - * Try to boostrap clang using clang + * Try to bootstrap clang using clang -- Sylvestre Ledru Wed, 17 Oct 2018 20:15:57 +0200 diff --git a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch b/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch index 561fdd6c..0489ecb3 100644 --- a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch +++ b/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch @@ -3,7 +3,7 @@ for any debugging with lldb which makes it unusable unless default version package has been installed. Small changes to code and debian/rules allows a workaround for lldb-server start up. -To use this one needs to add cmake defination during configure. eg +To use this one needs to add cmake definition during configure. eg -DDEBIAN_VERSION_SUFFIX=-$(LLVM_VERSION) Better implementation would be to use /usr/share/llvm-$(VERSION)/bin but diff --git a/debian/patches/series b/debian/patches/series index e413cce7..f189a676 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -96,7 +96,7 @@ clang-baseline-fix-i386.patch disable-sse2-old-x86.diff clang-arm-default-vfp3-on-armv7a.patch -# For the boostrap +# For the bootstrap bootstrap-fix-include-next.diff clangd-atomic-cmake.patch pr39427-misscompile.diff