0010-clang-Define-releative-gcc-installation-dir.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From d1fdcd76fc759e644d697c967ddfbeae279aa7ac Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Sat, 20 Mar 2021 16:09:16 -0700
  4. Subject: [PATCH] clang: Define / releative gcc installation dir
  5. This is required for OE gcc installation to work.
  6. Without this its not able to find the paths for libgcc
  7. and other standard headers and libraries from gcc
  8. installation in OE
  9. Upstream-Status: Pending
  10. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  11. ---
  12. clang/lib/Driver/ToolChains/Gnu.cpp | 14 +++++++-------
  13. 1 file changed, 7 insertions(+), 7 deletions(-)
  14. diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
  15. index cc9ed4f6b8ac..846163329d92 100644
  16. --- a/clang/lib/Driver/ToolChains/Gnu.cpp
  17. +++ b/clang/lib/Driver/ToolChains/Gnu.cpp
  18. @@ -2681,19 +2681,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
  19. // Whether this library suffix is relevant for the triple.
  20. bool Active;
  21. } Suffixes[] = {
  22. - // This is the normal place.
  23. - {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists},
  24. -
  25. - // Debian puts cross-compilers in gcc-cross.
  26. - {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists},
  27. -
  28. // The Freescale PPC SDK has the gcc libraries in
  29. // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do
  30. // this on Freescale triples, though, since some systems put a *lot* of
  31. // files in that location, not just GCC installation data.
  32. {CandidateTriple.str(), "..",
  33. TargetTriple.getVendor() == llvm::Triple::Freescale ||
  34. - TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}};
  35. + TargetTriple.getVendor() == llvm::Triple::OpenEmbedded},
  36. +
  37. + // This is the normal place.
  38. + {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists},
  39. +
  40. + // Debian puts cross-compilers in gcc-cross.
  41. + {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists}};
  42. for (auto &Suffix : Suffixes) {
  43. if (!Suffix.Active)