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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 6e17f402773f9408a62c8d03a39db5af6f637653 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. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. clang/lib/Driver/ToolChains/Gnu.cpp | 14 +++++++-------
  12. 1 file changed, 7 insertions(+), 7 deletions(-)
  13. diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
  14. index 633daa58590d..d22eaf698eb8 100644
  15. --- a/clang/lib/Driver/ToolChains/Gnu.cpp
  16. +++ b/clang/lib/Driver/ToolChains/Gnu.cpp
  17. @@ -2517,19 +2517,19 @@ void Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(
  18. // Whether this library suffix is relevant for the triple.
  19. bool Active;
  20. } Suffixes[] = {
  21. - // This is the normal place.
  22. - {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists},
  23. -
  24. - // Debian puts cross-compilers in gcc-cross.
  25. - {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists},
  26. -
  27. // The Freescale PPC SDK has the gcc libraries in
  28. // <sysroot>/usr/lib/<triple>/x.y.z so have a look there as well. Only do
  29. // this on Freescale triples, though, since some systems put a *lot* of
  30. // files in that location, not just GCC installation data.
  31. {CandidateTriple.str(), "..",
  32. TargetTriple.getVendor() == llvm::Triple::Freescale ||
  33. - TargetTriple.getVendor() == llvm::Triple::OpenEmbedded}};
  34. + TargetTriple.getVendor() == llvm::Triple::OpenEmbedded},
  35. +
  36. + // This is the normal place.
  37. + {"gcc/" + CandidateTriple.str(), "../..", GCCDirExists},
  38. +
  39. + // Debian puts cross-compilers in gcc-cross.
  40. + {"gcc-cross/" + CandidateTriple.str(), "../..", GCCCrossDirExists}};
  41. for (auto &Suffix : Suffixes) {
  42. if (!Suffix.Active)