View previous topic :: View next topic |
Author |
Message |
diabetes n00b
Joined: 08 Sep 2024 Posts: 2
|
Posted: Sun Sep 08, 2024 11:34 pm Post subject: gentoo-sources 6.10.8 ld.lld issue |
|
|
[Administrator note: this post, and the first 2 responses, were originally attached to the solved topic [SOLVED] gentoo-sources 6.10.8 32bit fails: relocation issue. -Hu]
There's another issue with scripts/Makefile.vmlinux_o.
When building the kernel with clang 18.1 w/ LTO on x86_64, LLD will output Code: | ld.lld: error: no input files | right before creating vmlinux and after tmp_remove-ctf.lds
It is caused by the following section in the patched Makefile, which was introduced with genpatches 6.10-11 and later as part of the dtrace patch. The dtrace patch is also what caused this thread btw.
Code: | # Generate a linker script to delete CTF sections
# -----------------------------------------------
quiet_cmd_gen_remove_ctf.lds = GEN $@
cmd_gen_remove_ctf.lds = \
$(LD) $(KBUILD_LDFLAGS) -r --verbose | awk -f $(real-prereqs) > $@
.tmp_remove-ctf.lds: $(srctree)/scripts/remove-ctf-lds.awk FORCE
$(call if_changed,gen_remove_ctf.lds)
targets := .tmp_remove-ctf.lds |
I don't exactly know what's going on, but if I were to guess, KBUILD_LDFLAGS is incomplete or the generated linker script is faulty with Clang+LTO. |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1949
|
Posted: Mon Sep 09, 2024 12:04 am Post subject: |
|
|
I'll have a look. |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1949
|
Posted: Mon Sep 09, 2024 7:07 pm Post subject: |
|
|
I can't yet reproduce it. Please share .config and the full log with make V=1 (or build.log if it's from dist kernel) via a pastebin. The versions of the LLVM toolchain may help too. Thanks.
(A separate thread would also be preferred.)
EDIT: oh, wait, I see it, it's just non-fatal. Let me see.
Last edited by sam_ on Mon Sep 09, 2024 7:24 pm; edited 1 time in total |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22619
|
Posted: Mon Sep 09, 2024 7:15 pm Post subject: |
|
|
sam_ wrote: | (A separate thread would also be preferred.) | Done. |
|
Back to top |
|
|
diabetes n00b
Joined: 08 Sep 2024 Posts: 2
|
Posted: Mon Sep 09, 2024 8:31 pm Post subject: |
|
|
So my sys-devel/clang version is 18.1.8, sys-devel/llvm is 18.1.8-r4
The issue affects gentoo-sources 6.10.8 and 6.10.9 (build log and config are from the latter).
In case you still need it, here's my kernel config (no Intel CPU support).
Here's the build log from Code: | make -j26 LLVM=1 V=1 vmlinux &> log |
The error occurs at line 10920.
Thank you for having a look at this! |
|
Back to top |
|
|
|