From 42c93a57a49623aee47bc1b5c025643d4745fe8b Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 23 Feb 2026 02:12:09 +0900 Subject: [PATCH] internal/rosa: fix patches Turns out alacritty clobbers output. It turns tabs into spaces and also removes whitespace-only lines for some reason. Signed-off-by: Ophestra --- internal/rosa/acl.go | 16 ++++++++-------- internal/rosa/llvm.go | 38 +++++++++++++++++++------------------- internal/rosa/qemu.go | 2 +- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/internal/rosa/acl.go b/internal/rosa/acl.go index f7eaf1c..56571d5 100644 --- a/internal/rosa/acl.go +++ b/internal/rosa/acl.go @@ -43,14 +43,14 @@ index 6ce2f9b..e9bde92 100644 --- a/test/attr.test +++ b/test/attr.test @@ -11,7 +11,7 @@ Try various valid and invalid names - - $ touch f - $ setfattr -n user -v value f -- > setfattr: f: Operation not supported -+ > setfattr: f: Not supported - - $ setfattr -n user. -v value f - > setfattr: f: Invalid argument + + $ touch f + $ setfattr -n user -v value f +- > setfattr: f: Operation not supported ++ > setfattr: f: Not supported + + $ setfattr -n user. -v value f + > setfattr: f: Invalid argument `}, ), &MakeAttr{ ScriptEarly: ` diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go index d0e0ac7..9a848cd 100644 --- a/internal/rosa/llvm.go +++ b/internal/rosa/llvm.go @@ -323,7 +323,7 @@ index 657f4230379e..12c305756184 100644 --- a/llvm/include/llvm/TargetParser/Triple.h +++ b/llvm/include/llvm/TargetParser/Triple.h @@ -185,6 +185,7 @@ public: - + Apple, PC, + Rosa, @@ -349,7 +349,7 @@ index 0584c941d2e6..e4d6ef963cc7 100644 + .Case("rosa", Triple::Rosa) .Default(Triple::UnknownVendor); } - + `}, {"xfail-broken-tests", `diff --git a/clang/test/Modules/timestamps.c b/clang/test/Modules/timestamps.c @@ -361,14 +361,14 @@ index 50fdce630255..4b4465a75617 100644 + /// Verify timestamps that gets embedded in the module #include - + `}, {"path-system-include", `diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index cdbf21fb9026..dd052858700d 100644 +index 8ac8d4eb9181..e46b04a898ca 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -773,6 +773,12 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, +@@ -671,6 +671,12 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, addExternCSystemInclude( DriverArgs, CC1Args, concat(SysRoot, "/usr/include", MultiarchIncludeDir)); @@ -378,15 +378,15 @@ index cdbf21fb9026..dd052858700d 100644 + DriverArgs, CC1Args, + concat(SysRoot, "/system/include", MultiarchIncludeDir)); + - + if (getTriple().getOS() == llvm::Triple::RTEMS) return; -@@ -783,6 +789,7 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs, +@@ -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); `}, @@ -400,13 +400,13 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 const bool IsRISCV = Triple.isRISCV(); const bool IsCSKY = Triple.isCSKY(); + const bool IsRosa = Triple.getVendor() == llvm::Triple::Rosa; - + if (IsCSKY && !SelectedMultilibs.empty()) SysRoot = SysRoot + SelectedMultilibs.back().osSuffix(); @@ -318,12 +319,23 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) const std::string OSLibDir = std::string(getOSLibDir(Triple, Args)); const std::string MultiarchTriple = getMultiarchTriple(D, Triple, SysRoot); - + + if (IsRosa) { + ExtraOpts.push_back("-rpath"); + ExtraOpts.push_back("/system/lib"); @@ -428,11 +428,11 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 + } } Generic_GCC::AddMultilibPaths(D, SysRoot, OSLibDir, MultiarchTriple, Paths); - + @@ -341,18 +353,30 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Paths); } - + - addPathIfExists(D, concat(SysRoot, "/usr/lib", MultiarchTriple), Paths); - addPathIfExists(D, concat(SysRoot, "/usr", OSLibDir), Paths); + if (!IsRosa) { @@ -451,9 +451,9 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 + else + addPathIfExists(D, concat(SysRoot, "/system", OSLibDir, ABIName), Paths); } - + Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths); - + - addPathIfExists(D, concat(SysRoot, "/lib"), Paths); - addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths); + if (!IsRosa) { @@ -463,7 +463,7 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 + addPathIfExists(D, concat(SysRoot, "/system/lib"), Paths); + } } - + ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { @@ -457,6 +481,9 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; @@ -474,20 +474,20 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 + std::string ArchName; bool IsArm = false; - + diff --git a/clang/tools/clang-installapi/Options.cpp b/clang/tools/clang-installapi/Options.cpp index 64324a3f8b01..15ce70b68217 100644 --- a/clang/tools/clang-installapi/Options.cpp +++ b/clang/tools/clang-installapi/Options.cpp @@ -515,7 +515,7 @@ bool Options::processFrontendOptions(InputArgList &Args) { FEOpts.FwkPaths = std::move(FrameworkPaths); - + // Add default framework/library paths. - PathSeq DefaultLibraryPaths = {"/usr/lib", "/usr/local/lib"}; + PathSeq DefaultLibraryPaths = {"/usr/lib", "/system/lib", "/usr/local/lib"}; PathSeq DefaultFrameworkPaths = {"/Library/Frameworks", "/System/Library/Frameworks"}; - + `}, }, }) diff --git a/internal/rosa/qemu.go b/internal/rosa/qemu.go index 6ede43d..07787c9 100644 --- a/internal/rosa/qemu.go +++ b/internal/rosa/qemu.go @@ -21,7 +21,7 @@ index b731af0ad9..b5cbed4801 100644 @@ -401,7 +401,7 @@ static void test_dgram_inet(void) qtest_quit(qts0); } - + -#if !defined(_WIN32) && !defined(CONFIG_DARWIN) +#if 0 static void test_dgram_mcast(void)