From e6f2b61e4fbb3040924f1d8ca6bcc7f428b768d4 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 8 May 2018 13:09:27 +0200 Subject: [PATCH 1/4] add a missing package to the list --- 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 1459d2e7..4f898eee 100644 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -248,7 +248,7 @@ rm a.out bar crash-* foo foo.* lldb-cmd.txt main.c test_fuzzer.cc # MARCH should iterate the library architectures via flags # LIB should iterate the different libraries echo "if it fails, please run" -echo "apt-get install libc6-dev:i386 libgcc-5-dev:i386 libc6-dev-x32 libx32gcc-5-dev" +echo "apt-get install libc6-dev:i386 libgcc-5-dev:i386 libc6-dev-x32 libx32gcc-5-dev libx32gcc-8-dev" for SYSTEM in ""; do for MARCH in -m64 -m32 -mx32 "-m32 -march=i686"; do for LIB in --rtlib=compiler-rt -fsanitize=address -fsanitize=thread -fsanitize=memory -fsanitize=undefined -fsanitize=dataflow; do # -fsanitize=efficiency-working-set; do From 8b13e24e416eb376b623fc755c818784955d5ecb Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 9 May 2018 14:04:33 +0200 Subject: [PATCH 2/4] version 7 is probably safer --- 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 4f898eee..4d1efa12 100644 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -274,7 +274,7 @@ for SYSTEM in ""; do done echo "If the following fails, try setting an environment variable such as:" -echo "OBJC_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/include" +echo "OBJC_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/include" echo "#include " > foo.m clang-$VERSION -c foo.m From 803058736f5bfb110f3b47189528e91ebaeeb093 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 9 May 2018 14:08:00 +0200 Subject: [PATCH 3/4] also recommend to install objc header --- debian/qualify-clang.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 4d1efa12..4e7ea94a 100644 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -275,6 +275,7 @@ done echo "If the following fails, try setting an environment variable such as:" echo "OBJC_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/include" +echo "libobjc-7-dev should be also installed" echo "#include " > foo.m clang-$VERSION -c foo.m From 9484e7ff517047302b442125c1852bdcdf52f09f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 9 May 2018 14:20:36 +0200 Subject: [PATCH 4/4] d/p/force-gcc-header-obj.diff Fix the detection of the objc path --- debian/changelog | 6 ++++++ debian/patches/force-gcc-header-obj.diff | 10 +++++----- debian/patches/series | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 095670ff..b1d6e49e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-5.0 (1:5.0.2-3) UNRELEASED; urgency=medium + + * d/p/force-gcc-header-obj.diff Fix the detection of the objc path + + -- Sylvestre Ledru Wed, 09 May 2018 14:21:13 +0200 + llvm-toolchain-5.0 (1:5.0.2-2) unstable; urgency=medium * Make CMake find_package(Clang) work. Fixes upstream bug diff --git a/debian/patches/force-gcc-header-obj.diff b/debian/patches/force-gcc-header-obj.diff index bcd2cbd1..e47d28c3 100644 --- a/debian/patches/force-gcc-header-obj.diff +++ b/debian/patches/force-gcc-header-obj.diff @@ -1,15 +1,15 @@ -Index: llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Driver/ToolChains.cpp +Index: llvm-toolchain-5.0-5.0.2~+rc1/clang/lib/Driver/ToolChains/Linux.cpp =================================================================== ---- llvm-toolchain-snapshot_3.5~svn201651.orig/clang/lib/Driver/ToolChains.cpp 2014-02-19 09:46:43.433569829 +0100 -+++ llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Driver/ToolChains.cpp 2014-02-19 09:46:45.621708435 +0100 -@@ -3078,6 +3078,11 @@ +--- llvm-toolchain-5.0-5.0.2~+rc1.orig/clang/lib/Driver/ToolChains/Linux.cpp ++++ llvm-toolchain-5.0-5.0.2~+rc1/clang/lib/Driver/ToolChains/Linux.cpp +@@ -571,6 +571,11 @@ void Linux::AddClangSystemIncludeArgs(co return; } + // Force the inclusion of the gcc headers (objc/objc.h) + addExternCSystemIncludeIfExists( + DriverArgs, CC1Args, GCCInstallation.getInstallPath() + "/include"); -+ ++// std::cout << GCCInstallation.getInstallPath().str() << "/include" << std::endl; + // Lacking those, try to detect the correct set of system includes for the // target triple. diff --git a/debian/patches/series b/debian/patches/series index 6fb81167..c9875507 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -14,7 +14,7 @@ atomic_library_2.diff python-clangpath.diff removeduplicatedeclaration.diff fix-clang-path-and-build.diff -#force-gcc-header-obj.diff +force-gcc-header-obj.diff do-not-fail-on-unexpected-pass.diff silent-more-tests.diff disable-display-PASS-UNSUPPORTED-XFAIL.diff