[PATCH] D105869: [Driver] fix PowerPC SPE musl dynamic linker name
Patrick Oppenlander via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 28 15:24:29 PST 2021
pattop updated this revision to Diff 390227.
pattop added a comment.
Add test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105869/new/
https://reviews.llvm.org/D105869
Files:
clang/lib/Driver/ToolChains/Linux.cpp
clang/test/Driver/linux-ld.c
Index: clang/test/Driver/linux-ld.c
===================================================================
--- clang/test/Driver/linux-ld.c
+++ clang/test/Driver/linux-ld.c
@@ -1718,6 +1718,9 @@
// RUN: --target=powerpc64-pc-linux-musl \
// RUN: | FileCheck --check-prefix=CHECK-MUSL-PPC64 %s
// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN: --target=powerpcspe-pc-linux-musl \
+// RUN: | FileCheck --check-prefix=CHECK-MUSL-PPCSPE %s
+// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=thumb-pc-linux-musleabi \
// RUN: | FileCheck --check-prefix=CHECK-MUSL-ARM %s
// RUN: %clang %s -### -o %t.o 2>&1 \
@@ -1767,6 +1770,7 @@
// CHECK-MUSL-MIPS64EL: "-dynamic-linker" "/lib/ld-musl-mips64el.so.1"
// CHECK-MUSL-PPC: "-dynamic-linker" "/lib/ld-musl-powerpc.so.1"
// CHECK-MUSL-PPC64: "-dynamic-linker" "/lib/ld-musl-powerpc64.so.1"
+// CHECK-MUSL-PPCSPE: "-dynamic-linker" "/lib/ld-musl-powerpc-sf.so.1"
// CHECK-MUSL-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
// CHECK-MUSL-ARMHF: "-dynamic-linker" "/lib/ld-musl-armhf.so.1"
// CHECK-MUSL-ARMEB: "-dynamic-linker" "/lib/ld-musl-armeb.so.1"
Index: clang/lib/Driver/ToolChains/Linux.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Linux.cpp
+++ clang/lib/Driver/ToolChains/Linux.cpp
@@ -421,6 +421,9 @@
(Triple.getEnvironment() == llvm::Triple::MuslEABIHF ||
tools::arm::getARMFloatABI(*this, Args) == tools::arm::FloatABI::Hard))
ArchName += "hf";
+ if (Arch == llvm::Triple::ppc &&
+ Triple.getSubArch() == llvm::Triple::PPCSubArch_spe)
+ ArchName = "powerpc-sf";
return "/lib/ld-musl-" + ArchName + ".so.1";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105869.390227.patch
Type: text/x-patch
Size: 1736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211128/cea878d4/attachment.bin>
More information about the cfe-commits
mailing list