diff --git a/debian/changelog b/debian/changelog index 7542e398..bc0442f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-3.2 (1:3.2repack-1~exp4) UNRELEASED; urgency=low + + * Apply patch from upstream (r176557) to detect new search path for recent + Debian changes and Ubuntu 13.04 + + -- Sylvestre Ledru Wed, 06 Mar 2013 19:06:05 +0100 + llvm-toolchain-3.2 (1:3.2repack-1~exp3) experimental; urgency=low * Remove package "clang". It is now provided by llvm-defaults. diff --git a/debian/patches/28-gcc-4.7-paths.diff b/debian/patches/28-gcc-4.7-paths.diff deleted file mode 100644 index c3b79cb8..00000000 --- a/debian/patches/28-gcc-4.7-paths.diff +++ /dev/null @@ -1,39 +0,0 @@ -Index: llvm-3.2.src/clang/lib/Driver/ToolChains.cpp -=================================================================== ---- llvm-3.2.src.orig/clang/lib/Driver/ToolChains.cpp 2013-01-18 15:57:25.240901367 +0100 -+++ llvm-3.2.src/clang/lib/Driver/ToolChains.cpp 2013-01-18 15:57:49.752900485 +0100 -@@ -36,6 +36,9 @@ - #include // ::getenv - - #include "clang/Config/config.h" // for GCC_INSTALL_PREFIX -+#include "clang/Debian/debian_path.h" -+ -+#include - - using namespace clang::driver; - using namespace clang::driver::toolchains; -@@ -2379,6 +2382,10 @@ - - const std::string IncludePathCandidates[] = { - LibDir.str() + "/../include/c++/" + Version.str(), -+ // Once more, Debian headers locations changed (since gcc version 4.7.2-5) -+ // See Debian bug tracker #693240 -+ LibDir.str() + "/../include/"+ TripleStr.str() +"/c++/" + Version.str(), -+ LibDir.str() + "/../include/" + DEB_HOST_MULTIARCH_TRIPLET + "/c++/" + Version.str(), - // Gentoo is weird and places its headers inside the GCC install, so if the - // first attempt to find the headers fails, try this pattern. - InstallDir.str() + "/include/g++-v4", -@@ -2390,10 +2397,10 @@ - }; - - for (unsigned i = 0; i < llvm::array_lengthof(IncludePathCandidates); ++i) { -- if (addLibStdCXXIncludePaths(IncludePathCandidates[i], (TripleStr + -+ addLibStdCXXIncludePaths(IncludePathCandidates[i], (TripleStr + - GCCInstallation.getMultiarchSuffix()), -- DriverArgs, CC1Args)) -- break; -+ DriverArgs, CC1Args); -+ - } - } - diff --git a/debian/patches/28-search-path-new-gcc.diff b/debian/patches/28-search-path-new-gcc.diff new file mode 100644 index 00000000..36ff9da6 --- /dev/null +++ b/debian/patches/28-search-path-new-gcc.diff @@ -0,0 +1,52 @@ +Index: llvm-3.2.src/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- llvm-3.2.src.orig/clang/lib/Driver/ToolChains.cpp 2013-03-06 19:03:34.720700869 +0100 ++++ llvm-3.2.src/clang/lib/Driver/ToolChains.cpp 2013-03-06 19:03:48.968700591 +0100 +@@ -2338,7 +2338,7 @@ + addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include"); + } + +-/// \brief Helper to add the thre variant paths for a libstdc++ installation. ++/// \brief Helper to add the three variant paths for a libstdc++ installation. + /*static*/ bool Linux::addLibStdCXXIncludePaths(Twine Base, Twine TargetArchDir, + const ArgList &DriverArgs, + ArgStringList &CC1Args) { +@@ -2350,6 +2350,22 @@ + return true; + } + ++/// \brief Helper to add an extra variant path for an (Ubuntu) multilib ++/// libstdc++ installation. ++/*static*/ bool Linux::addLibStdCXXIncludePaths(Twine Base, Twine Suffix, ++ Twine TargetArchDir, ++ Twine MultiLibSuffix, ++ const ArgList &DriverArgs, ++ ArgStringList &CC1Args) { ++ if (!addLibStdCXXIncludePaths(Base+Suffix, TargetArchDir + MultiLibSuffix, ++ DriverArgs, CC1Args)) ++ return false; ++ ++ addSystemInclude(DriverArgs, CC1Args, Base + "/" + TargetArchDir + Suffix ++ + MultiLibSuffix); ++ return true; ++} ++ + void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, + ArgStringList &CC1Args) const { + if (DriverArgs.hasArg(options::OPT_nostdlibinc) || +@@ -2377,8 +2393,14 @@ + StringRef Version = GCCInstallation.getVersion().Text; + StringRef TripleStr = GCCInstallation.getTriple().str(); + ++ if (addLibStdCXXIncludePaths(LibDir.str() + "/../include", ++ "/c++/" + Version.str(), ++ TripleStr, ++ GCCInstallation.getMultiarchSuffix(), ++ DriverArgs, CC1Args)) ++ return; ++ + const std::string IncludePathCandidates[] = { +- LibDir.str() + "/../include/c++/" + Version.str(), + // Gentoo is weird and places its headers inside the GCC install, so if the + // first attempt to find the headers fails, try this pattern. + InstallDir.str() + "/include/g++-v4", diff --git a/debian/patches/series b/debian/patches/series index e98351a7..21b04af6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,8 +6,8 @@ 26-disable_SplitsOnSpaces.diff 27-fix_clang_stdint.diff 26-set-correct-float-abi.diff +28-search-path-new-gcc.diff profile_rt.diff -28-gcc-4.7-paths.diff 29-hurd.diff 30-kfreebsd.diff 0003-Debian-version-info-and-bugreport.patch