From 8841be9b2b22d4859994aaf48bf2ceea4cb209b6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 19 Jun 2014 17:14:44 +0000 Subject: [PATCH 1/5] Ship the compiler-rt static libraries --- debian/changelog | 6 ++++++ debian/libclang-3.4-dev.install | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 42adb4de..b0226e90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-3.4 (1:3.4.2-3) unstable; urgency=medium + + * Ship the compiler-rt static libraries + + -- Sylvestre Ledru Thu, 19 Jun 2014 19:13:16 +0200 + llvm-toolchain-3.4 (1:3.4.2-2) unstable; urgency=medium * Improve the CVE-2014-2893 fix (Closes: #744817) diff --git a/debian/libclang-3.4-dev.install b/debian/libclang-3.4-dev.install index 9ba75a17..f188f751 100644 --- a/debian/libclang-3.4-dev.install +++ b/debian/libclang-3.4-dev.install @@ -5,7 +5,7 @@ usr/lib/llvm-3.4/lib/libclang*a usr/lib/llvm-3.4/lib/libpolly* usr/lib/llvm-3.4/lib/libmodernizeCore.a - +build-llvm/tools/clang/runtime/compiler-rt/clang_linux/ usr/lib/llvm-3.4/lib/clang/3.4.2/lib/ #usr/include/clang /usr/include/ #usr/include/clang-c /usr/include/ From f3b41228ea91d9160d2d74d5a6a887df7c7c2af0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 20 Jun 2014 13:34:31 +0000 Subject: [PATCH 2/5] Running tests respect DEB_BUILD_OPTIONS=parallel=X (Closes: #751943) --- debian/changelog | 2 ++ debian/patches/follow-parallel-var.diff | 16 ++++++++++++++++ debian/patches/series | 1 + debian/rules | 4 ++-- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 debian/patches/follow-parallel-var.diff diff --git a/debian/changelog b/debian/changelog index b0226e90..90a13b85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ llvm-toolchain-3.4 (1:3.4.2-3) unstable; urgency=medium * Ship the compiler-rt static libraries + * Running tests respect DEB_BUILD_OPTIONS=parallel=X + (Closes: #751943) -- Sylvestre Ledru Thu, 19 Jun 2014 19:13:16 +0200 diff --git a/debian/patches/follow-parallel-var.diff b/debian/patches/follow-parallel-var.diff new file mode 100644 index 00000000..45af781d --- /dev/null +++ b/debian/patches/follow-parallel-var.diff @@ -0,0 +1,16 @@ +Index: llvm-toolchain-3.4-3.4.2/test/Makefile +=================================================================== +--- llvm-toolchain-3.4-3.4.2.orig/test/Makefile ++++ llvm-toolchain-3.4-3.4.2/test/Makefile +@@ -29,6 +29,11 @@ else + LIT_ARGS := -s -v + endif + ++# NJOBS allows an override of the number of threads ++ifneq ($(NJOBS),) ++LIT_ARGS += $(NJOBS) ++endif ++ + ifdef TESTSUITE + LIT_TESTSUITE := $(TESTSUITE) + else diff --git a/debian/patches/series b/debian/patches/series index de5b00cc..3c39437c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -40,3 +40,4 @@ scan-build-fix-clang-detection.diff compiler-rt-path.diff lldb-soname.diff CVE-2014-2893.diff +follow-parallel-var.diff diff --git a/debian/rules b/debian/rules index a060709d..b7c88dc4 100755 --- a/debian/rules +++ b/debian/rules @@ -355,9 +355,9 @@ override_dh_auto_test: # LLVM tests ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK))) # Fail the build if the test fails - LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check + NJOBS="$(NJOBS)" LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check else - LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check || true + NJOBS="$(NJOBS)" LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check || true endif # clang tests From 861a07c2be4aa7c0f2daa3eda72e8950e891a1f7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 20 Jun 2014 16:01:22 +0000 Subject: [PATCH 3/5] Fix FTBFS on powerpc and powerpcspe (Closes: #733890) --- debian/changelog | 1 + debian/rules | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 90a13b85..673941df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ llvm-toolchain-3.4 (1:3.4.2-3) unstable; urgency=medium * Ship the compiler-rt static libraries * Running tests respect DEB_BUILD_OPTIONS=parallel=X (Closes: #751943) + * Fix FTBFS on powerpc and powerpcspe (Closes: #733890) -- Sylvestre Ledru Thu, 19 Jun 2014 19:13:16 +0200 diff --git a/debian/rules b/debian/rules index b7c88dc4..59337347 100755 --- a/debian/rules +++ b/debian/rules @@ -28,6 +28,10 @@ LDFLAGS_EXTRA= CXXFLAGS_EXTRA= CONFIGURE_EXTRA= +ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) +LDFLAGS_EXTRA += -latomic +endif + confargs := \ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) From 22dfe00ec531674d367d76f4fcd0e76822f6eba1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 22 Jun 2014 14:59:05 +0000 Subject: [PATCH 4/5] Broken library symlink fixed in lldb-3.4 (Closes: #715130) --- debian/changelog | 1 + debian/lldb-3.4.links.in | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/debian/changelog b/debian/changelog index 673941df..c16b6d83 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ llvm-toolchain-3.4 (1:3.4.2-3) unstable; urgency=medium * Running tests respect DEB_BUILD_OPTIONS=parallel=X (Closes: #751943) * Fix FTBFS on powerpc and powerpcspe (Closes: #733890) + * Broken library symlink fixed in lldb-3.4 (Closes: #715130) -- Sylvestre Ledru Thu, 19 Jun 2014 19:13:16 +0200 diff --git a/debian/lldb-3.4.links.in b/debian/lldb-3.4.links.in index 9a977cab..2b2359d5 100644 --- a/debian/lldb-3.4.links.in +++ b/debian/lldb-3.4.links.in @@ -6,3 +6,7 @@ usr/lib/@DEB_HOST_MULTIARCH@/liblldb.so.1 usr/lib/llvm-3.4/lib/liblldb.so. usr/bin/lldb-3.4 usr/bin/lldb usr/bin/lldb-platform-3.4 usr/bin/lldb-platform usr/bin/lldb-gdbserver-3.4 usr/bin/lldb-gdbserver + +usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.4.2.so.1 usr/lib/python2.7/dist-packages/lldb/libLLVM-3.4.2.so.1 +usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.4.2.so.1 usr/lib/python2.7/dist-packages/lldb/libLLVM-3.4.so.1 + From d4f852c21776f407885b7ea21d287df7cdb03e44 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 22 Jun 2014 16:05:05 +0000 Subject: [PATCH 5/5] Fix --use-cc when no absolute path is provided (Closes: #748777) --- debian/changelog | 1 + debian/patches/scan-build-search-path.diff | 39 ++++++++++++++++++++++ debian/patches/series | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 debian/patches/scan-build-search-path.diff diff --git a/debian/changelog b/debian/changelog index c16b6d83..e56ce549 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ llvm-toolchain-3.4 (1:3.4.2-3) unstable; urgency=medium (Closes: #751943) * Fix FTBFS on powerpc and powerpcspe (Closes: #733890) * Broken library symlink fixed in lldb-3.4 (Closes: #715130) + * Fix --use-cc when no absolute path is provided (Closes: #748777) -- Sylvestre Ledru Thu, 19 Jun 2014 19:13:16 +0200 diff --git a/debian/patches/scan-build-search-path.diff b/debian/patches/scan-build-search-path.diff new file mode 100644 index 00000000..53b01ca4 --- /dev/null +++ b/debian/patches/scan-build-search-path.diff @@ -0,0 +1,39 @@ +Index: llvm-toolchain-3.4-3.4.2/clang/tools/scan-build/ccc-analyzer +=================================================================== +--- llvm-toolchain-3.4-3.4.2.orig/clang/tools/scan-build/ccc-analyzer 2014-06-22 08:51:25.452950214 -0700 ++++ llvm-toolchain-3.4-3.4.2/clang/tools/scan-build/ccc-analyzer 2014-06-22 08:52:17.602331808 -0700 +@@ -25,6 +25,17 @@ + # Compiler command setup. + ##===----------------------------------------------------------------------===## + ++# Search in the PATH if the compiler exists ++sub SearchInPath { ++ my $file = shift; ++ foreach my $dir (split (':', $ENV{PATH})) { ++ if (-x "$dir/$file") { ++ return 1; ++ } ++ } ++ return 0; ++} ++ + my $Compiler; + my $Clang; + my $DefaultCCompiler; +@@ -40,14 +51,14 @@ + + if ($FindBin::Script =~ /c\+\+-analyzer/) { + $Compiler = $ENV{'CCC_CXX'}; +- if (!defined $Compiler || ! -x $Compiler) { $Compiler = $DefaultCXXCompiler; } ++ if (!defined $Compiler || ! -x $Compiler || ! SearchInPath($Compiler)) { $Compiler = $DefaultCXXCompiler; } + + $Clang = $ENV{'CLANG_CXX'}; + if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++'; } + } + else { + $Compiler = $ENV{'CCC_CC'}; +- if (!defined $Compiler || ! -x $Compiler) { $Compiler = $DefaultCCompiler; } ++ if (!defined $Compiler || ! -x $Compiler && ! SearchInPath($Compiler)) { $Compiler = $DefaultCCompiler; } + + $Clang = $ENV{'CLANG'}; + if (!defined $Clang || ! -x $Clang) { $Clang = 'clang'; } diff --git a/debian/patches/series b/debian/patches/series index 3c39437c..951df61f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -41,3 +41,5 @@ compiler-rt-path.diff lldb-soname.diff CVE-2014-2893.diff follow-parallel-var.diff +scan-build-search-path.diff +