From 54aae9d72a12ae8af93ba35d00a3817e3105dcce Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 21 May 2026 17:51:23 +0900 Subject: internal/rosa/package: migrate llvm patches LLVM itself is unlikely to ever be migrated due to complexity of the bootstrap, so migrate patches instead. Signed-off-by: Ophestra --- .../rosa/package/llvm/path-system-include.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 internal/rosa/package/llvm/path-system-include.patch (limited to 'internal/rosa/package/llvm/path-system-include.patch') diff --git a/internal/rosa/package/llvm/path-system-include.patch b/internal/rosa/package/llvm/path-system-include.patch new file mode 100644 index 00000000..c442d641 --- /dev/null +++ b/internal/rosa/package/llvm/path-system-include.patch @@ -0,0 +1,25 @@ +diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp +index 8ac8d4eb9181..e46b04a898ca 100644 +--- a/clang/lib/Driver/ToolChains/Linux.cpp ++++ b/clang/lib/Driver/ToolChains/Linux.cpp +@@ -671,6 +671,12 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, + addExternCSystemInclude( + DriverArgs, CC1Args, + concat(SysRoot, "/usr/include", MultiarchIncludeDir)); ++ if (!MultiarchIncludeDir.empty() && ++ D.getVFS().exists(concat(SysRoot, "/system/include", MultiarchIncludeDir))) ++ addExternCSystemInclude( ++ DriverArgs, CC1Args, ++ concat(SysRoot, "/system/include", MultiarchIncludeDir)); ++ + + if (getTriple().getOS() == llvm::Triple::RTEMS) + return; +@@ -681,6 +687,7 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, + addExternCSystemInclude(DriverArgs, CC1Args, concat(SysRoot, "/include")); + + addExternCSystemInclude(DriverArgs, CC1Args, concat(SysRoot, "/usr/include")); ++ addExternCSystemInclude(DriverArgs, CC1Args, concat(SysRoot, "/system/include")); + + if (!DriverArgs.hasArg(options::OPT_nobuiltininc) && getTriple().isMusl()) + addSystemInclude(DriverArgs, CC1Args, ResourceDirInclude); -- cgit v1.3.1