does somebody knows why lld isn't available for powerpc?
compile a kernel with
'make LLVM=1 HOSTCC=/usr/bin/clang-13 HOSTCXX=/usr/bin/clang++-13 CC=/usr/bin/clang-13'
where LLVM=1 points to the llvm linker. Without LLVM-1 it seems to use the binutils.
On Sat, Oct 16, 2021 at 10:16 AM Elimar Riesebieter <riesebie@lxtec.de> wrote:
does somebody knows why lld isn't available for powerpc?
You can check the builtin makefile rules with '-p' option:
$ make -p | grep -E 'LD|LINK'
...
LINK.m = $(OBJC) $(OBJCFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.o = $(CC) $(LDFLAGS) $(TARGET_ARCH)
LINK.p = $(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LD = ld
LINK.r = $(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.C = $(LINK.cc)
LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH)
LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH)
LINK.s = $(CC) $(ASFLAGS) $(LDFLAGS) $(TARGET_MACH)
LINK.cpp = $(LINK.cc)
...
If you want to use a different linker, then set the variable LD to that linker.
If you want to use a different linker, then set the variable LD to that linker.
I believe this is what LLVM=1 does. Start a compile with LVM=1 set
ld.lld, which is part of ldd package, isn't found.
does somebody knows why lld isn't available for powerpc?
https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/blob/snapshot/debian/rules#L284
On 10/16/21 16:09, Elimar Riesebieter wrote:
does somebody knows why lld isn't available for powerpc?
It's not available because we're currently not building LLVM for powerpc and ppc64, see:
If you want to use a different linker, then set the variable LD to that linker.
I believe this is what LLVM=1 does. Start a compile with LVM=1 set
ld.lld, which is part of ldd package, isn't found.
You might try -fuse-ld=lld. From https://lld.llvm.org/:
If you don’t want to change the system setting,
you can use clang’s -fuse-ld option. In this way,
you want to set -fuse-ld=lld to LDFLAGS when
building your programs.
Jeff
On Sat, Oct 16, 2021 at 4:43 PM John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> wrote:
On 10/16/21 16:09, Elimar Riesebieter wrote:
does somebody knows why lld isn't available for powerpc?
It's not available because we're currently not building LLVM for powerpc and
ppc64, see:
According to https://lld.llvm.org, PowerPC and PowerPC64 are supported arches:
It supports various CPUs/ABIs including AArch64, AMDGPU, ARM, Hexagon,
MIPS 32/64 big/little-endian, PowerPC, PowerPC64, RISC-V, SPARC V9,
x86-32 and x86-64. Among these, AArch64, ARM (>= v6), PowerPC,
PowerPC64, x86-32 and x86-64 have production quality. MIPS seems
decent too.
It may be time to give lld a whirl.
libcxx and libcxxabi may be a different story, however.
It supports various CPUs/ABIs including AArch64, AMDGPU, ARM, Hexagon,
MIPS 32/64 big/little-endian, PowerPC, PowerPC64, RISC-V, SPARC V9,
x86-32 and x86-64. Among these, AArch64, ARM (>= v6), PowerPC,
PowerPC64, x86-32 and x86-64 have production quality. MIPS seems
decent too.
It may be time to give lld a whirl.
/usr/bin/ld: lib/liblldbPluginProcessLinux.a(NativeThreadLinux.cpp.o): in function `lldb_private::process_linux::NativeThreadLinux::NativeThreadLinux(lldb_private::process_linux::NativeProcessLinux&, unsigned long long)':const&, lldb_private::process_linux::NativeThreadLinux&)'
/home/glaubitz/llvm13/llvm-toolchain-13-13.0.0/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp:96: undefined reference to `lldb_private::process_linux::NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(lldb_private::ArchSpec
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 286 |
Nodes: | 16 (2 / 14) |
Uptime: | 89:26:44 |
Calls: | 6,496 |
Calls today: | 7 |
Files: | 12,100 |
Messages: | 5,277,442 |