diff -wpruN '--exclude=*.orig' a~/lib/Driver/ToolChains/Solaris.cpp a/lib/Driver/ToolChains/Solaris.cpp --- llvm-16.0.6.src~/tools/clang/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 +++ llvm-16.0.6.src/tools/clang/lib/Driver/ToolChains/Solaris.cpp 1970-01-01 00:00:00 @@ -243,9 +243,6 @@ void Solaris::AddClangSystemIncludeArgs( if (DriverArgs.hasArg(clang::driver::options::OPT_nostdinc)) return; - if (!DriverArgs.hasArg(options::OPT_nostdlibinc)) - addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include"); - if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { SmallString<128> P(D.ResourceDir); llvm::sys::path::append(P, "include"); diff -wpruN '--exclude=*.orig' a~/lib/Lex/InitHeaderSearch.cpp a/lib/Lex/InitHeaderSearch.cpp --- llvm-16.0.6.src~/tools/clang/lib/Lex/InitHeaderSearch.cpp 1970-01-01 00:00:00 +++ llvm-16.0.6.src/tools/clang/lib/Lex/InitHeaderSearch.cpp 1970-01-01 00:00:00 @@ -242,6 +242,7 @@ void InitHeaderSearch::AddDefaultCInclud case llvm::Triple::PS4: case llvm::Triple::PS5: case llvm::Triple::ELFIAMCU: + case llvm::Triple::Solaris: break; case llvm::Triple::Win32: if (triple.getEnvironment() != llvm::Triple::Cygnus)