Bug 215862
Summary: | clang-15 fails ppc64 BE kernel build - ld.lld: error: undefined symbol: .early_setup | ||
---|---|---|---|
Product: | Platform Specific/Hardware | Reporter: | Erhard F. (erhard_f) |
Component: | PPC-64 | Assignee: | platform_ppc-64 |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | christophe.leroy |
Priority: | P1 | ||
Hardware: | PPC-64 | ||
OS: | Linux | ||
URL: | https://github.com/ClangBuiltLinux/linux/issues/1761 | ||
Kernel Version: | 5.18-rc3 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
kernel .config (kernel 5.18-rc3, Talos II)
kernel .config (6.1-rc5, PowerMac G5 11,2) attachment-29432-0.html |
Reinvestigated with clang 15 on my PowerMac G5 11,2.
Got further on as kernel + modules are built now. But I get an error at the linking stage:
# LLVM=1 LLVM_IAS=1 make
CALL scripts/checksyscalls.sh
UPD include/generated/utsversion.h
CC init/version-timestamp.o
LD .tmp_vmlinux.kallsyms1
ld.lld: error: undefined symbol: .early_setup
>>> referenced by head_64.S:973
>>> (/usr/src/linux-stable/arch/powerpc/kernel/head_64.S:973)
>>> arch/powerpc/kernel/head_64.o:(.ref.text+0xBE) in archive
>>> vmlinux.a
>>> referenced by head_64.S:973
>>> (/usr/src/linux-stable/arch/powerpc/kernel/head_64.S:973)
>>> arch/powerpc/kernel/head_64.o:(.ref.text+0xC2) in archive
>>> vmlinux.a
>>> did you mean: early_setup
>>> defined in: vmlinux.a(arch/powerpc/kernel/setup_64.o)
make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
make: *** [Makefile:1236: vmlinux] Error 2
Toolchain used was llvm/clang/lld-15.0.3. Same kernel builds fine with gcc-12.2, binutils-2.39.
Created attachment 303185 [details]
kernel .config (6.1-rc5, PowerMac G5 11,2)
If not already done, can you report the problem at https://github.com/ClangBuiltLinux/linux/issues (In reply to Christophe Leroy from comment #3) > If not already done, can you report the problem at > https://github.com/ClangBuiltLinux/linux/issues I was not aware of this issue tracker. Thanks for the hint! Filed now unter https://github.com/ClangBuiltLinux/linux/issues/1761 Fixed in kernel v6.4.x series. Closing. Created attachment 304741 [details]
attachment-29432-0.html
I'm out of office until August 1st.
|
Created attachment 300776 [details] kernel .config (kernel 5.18-rc3, Talos II) # make LLVM=1 [...] AR usr/built-in.a CC arch/powerpc/kernel/ptrace/ptrace.o CC arch/powerpc/kernel/ptrace/ptrace-view.o CC arch/powerpc/kernel/ptrace/ptrace-fpu.o CC arch/powerpc/kernel/ptrace/ptrace32.o CC arch/powerpc/kernel/ptrace/ptrace-vsx.o CC arch/powerpc/kernel/ptrace/ptrace-altivec.o CC arch/powerpc/kernel/ptrace/ptrace-tm.o CC arch/powerpc/kernel/ptrace/ptrace-noadv.o AR arch/powerpc/kernel/ptrace/built-in.a AR arch/powerpc/kernel/trace/built-in.a AS arch/powerpc/kernel/head_64.o <unknown>:0: error: expected relocatable expression make[2]: *** [scripts/Makefile.build:389: arch/powerpc/kernel/head_64.o] Fehler 1 make[1]: *** [scripts/Makefile.build:550: arch/powerpc/kernel] Fehler 2 make: *** [Makefile:1834: arch/powerpc] Fehler 2 Toolchain used was llvm/clang/lld-14.0.1. Same kernel builds fine with gcc-11.2, binutils-2.37.