Ticket #53194: patch-macports-libstdcxx.diff

File patch-macports-libstdcxx.diff, 1.8 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 8 years ago)
  • tools/clang/lib/Frontend/InitHeaderSearch.cpp

    old new  
    109109#if defined(LLVM_ON_WIN32)
    110110  return !Path.empty() && llvm::sys::path::is_separator(Path[0]);
    111111#else
    112   return llvm::sys::path::is_absolute(Path);
     112  return llvm::sys::path::is_absolute(Path) && Path.find("@@MACPORTS_GCC_INCLUDE_DIR@@")!=0;
    113113#endif
    114114}
    115115
     
    362362
    363363    case llvm::Triple::ppc:
    364364    case llvm::Triple::ppc64:
     365      AddGnuCPlusPlusIncludePaths("@@MACPORTS_GCC_INCLUDE_DIR@@",
     366                                  "@@MACPORTS_HOST_NAME@@", "", "ppc64",
     367                                  triple);
    365368      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
    366369                                  "powerpc-apple-darwin10", "", "ppc64",
    367370                                  triple);
     
    372375
    373376    case llvm::Triple::x86:
    374377    case llvm::Triple::x86_64:
     378      AddGnuCPlusPlusIncludePaths("@@MACPORTS_GCC_INCLUDE_DIR@@",
     379                                  "@@MACPORTS_HOST_NAME@@", "i386", "", triple);
    375380      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
    376381                                  "i686-apple-darwin10", "", "x86_64", triple);
    377382      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.0.0",
  • tools/clang/lib/Driver/ToolChains.cpp

    old new  
    746746    // platforms we care about it was -lstdc++.6, so we search for that
    747747    // explicitly if we can't see an obvious -lstdc++ candidate.
    748748
     749    if (getVFS().exists("@@MACPORTS_libstdc++@@")) {
     750      CmdArgs.push_back("@@MACPORTS_libstdc++@@");
     751      return;
     752    }
     753
    749754    // Check in the sysroot first.
    750755    if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) {
    751756      SmallString<128> P(A->getValue());