From d23c4ecc7ce0f9aa1c7b6322636235b607c310c8 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 30 Apr 2026 00:39:13 +0900 Subject: [PATCH] internal/rosa/llvm: use correct triple for rpath MultiarchTriple produces a generic glibc triple string. Signed-off-by: Ophestra --- internal/rosa/llvm_patches_latest.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/internal/rosa/llvm_patches_latest.go b/internal/rosa/llvm_patches_latest.go index 5e285cb0..f1060b9f 100644 --- a/internal/rosa/llvm_patches_latest.go +++ b/internal/rosa/llvm_patches_latest.go @@ -91,10 +91,10 @@ index 8ac8d4eb9181..e46b04a898ca 100644 `}, {"path-system-libraries", `diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 8ac8d4eb9181..f4d1347ab64d 100644 +index d525b417b4ea..fdc411f2239c 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -282,6 +282,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) +@@ -302,6 +302,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) const bool IsHexagon = Arch == llvm::Triple::hexagon; const bool IsRISCV = Triple.isRISCV(); const bool IsCSKY = Triple.isCSKY(); @@ -102,7 +102,7 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 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) +@@ -337,12 +338,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); @@ -110,7 +110,7 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 + ExtraOpts.push_back("-rpath"); + ExtraOpts.push_back("/system/lib"); + ExtraOpts.push_back("-rpath"); -+ ExtraOpts.push_back(concat("/system/lib", MultiarchTriple)); ++ ExtraOpts.push_back(concat("/system/lib", Triple.str())); + } + // mips32: Debian multilib, we use /libo32, while in other case, /lib is @@ -128,7 +128,7 @@ 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) +@@ -360,18 +372,30 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) Paths); } @@ -164,7 +164,7 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 } ToolChain::RuntimeLibType Linux::GetDefaultRuntimeLibType() const { -@@ -457,6 +481,9 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { +@@ -572,6 +596,9 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const { return Triple.isArch64Bit() ? "/system/bin/linker64" : "/system/bin/linker"; } if (Triple.isMusl()) { @@ -175,10 +175,10 @@ index 8ac8d4eb9181..f4d1347ab64d 100644 bool IsArm = false; diff --git a/clang/tools/clang-installapi/Options.cpp b/clang/tools/clang-installapi/Options.cpp -index 64324a3f8b01..15ce70b68217 100644 +index f484d6f33ad8..dca55e72d67e 100644 --- a/clang/tools/clang-installapi/Options.cpp +++ b/clang/tools/clang-installapi/Options.cpp -@@ -515,7 +515,7 @@ bool Options::processFrontendOptions(InputArgList &Args) { +@@ -514,7 +514,7 @@ bool Options::processFrontendOptions(InputArgList &Args) { FEOpts.FwkPaths = std::move(FrameworkPaths); // Add default framework/library paths.