From c2e0bf0f41fa02c4f446c7aaf40b0006665fa1c0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 18 Feb 2017 16:56:49 +0000 Subject: [PATCH] Fix the C++ include path order (Closes: #855222) Many thanks to Jason Rhinelander for investigating --- debian/changelog | 7 +++++++ debian/patches/fix-clang-path-and-build.diff | 21 ++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7e8e22d2..82d580a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-4.0 (1:4.0~+rc2-2) UNRELEASED; urgency=medium + + * Fix the C++ include path order (Closes: #855222) + Many thanks to Jason Rhinelander for investigating + + -- Sylvestre Ledru Sat, 18 Feb 2017 17:54:01 +0100 + llvm-toolchain-4.0 (1:4.0~+rc2-1) unstable; urgency=medium * New testing release diff --git a/debian/patches/fix-clang-path-and-build.diff b/debian/patches/fix-clang-path-and-build.diff index 64eb9977..c566bcc3 100644 --- a/debian/patches/fix-clang-path-and-build.diff +++ b/debian/patches/fix-clang-path-and-build.diff @@ -2,14 +2,15 @@ clang/lib/Driver/ToolChains.cpp | 2 ++ 1 file changed, 2 insertions(+) ---- a/clang/lib/Driver/ToolChains.cpp -+++ b/clang/lib/Driver/ToolChains.cpp -@@ -2842,6 +2842,8 @@ void Generic_GCC::AddClangCXXStdlibInclu - DriverArgs.hasArg(options::OPT_nostdincxx)) - return; - +Index: llvm-toolchain-4.0-4.0~+rc2/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- llvm-toolchain-4.0-4.0~+rc2.orig/clang/lib/Driver/ToolChains.cpp ++++ llvm-toolchain-4.0-4.0~+rc2/clang/lib/Driver/ToolChains.cpp +@@ -2952,6 +2952,7 @@ void Generic_GCC::AddClangCXXStdlibInclu + addLibStdCxxIncludePaths(DriverArgs, CC1Args); + break; + } + addSystemInclude(DriverArgs, CC1Args, "/usr/include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/"); -+ - switch (GetCXXStdlibType(DriverArgs)) { - case ToolChain::CST_Libcxx: { - std::string Path = findLibCxxIncludePath(); + } + + std::string Generic_GCC::findLibCxxIncludePath() const {