Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo-sources 6.10.8 ld.lld issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
diabetes
n00b
n00b


Joined: 08 Sep 2024
Posts: 2

PostPosted: Sun Sep 08, 2024 11:34 pm    Post subject: gentoo-sources 6.10.8 ld.lld issue Reply with quote

[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
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1868

PostPosted: Mon Sep 09, 2024 12:04 am    Post subject: Reply with quote

I'll have a look.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1868

PostPosted: Mon Sep 09, 2024 7:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22404

PostPosted: Mon Sep 09, 2024 7:15 pm    Post subject: Reply with quote

sam_ wrote:
(A separate thread would also be preferred.)
Done.
Back to top
View user's profile Send private message
diabetes
n00b
n00b


Joined: 08 Sep 2024
Posts: 2

PostPosted: Mon Sep 09, 2024 8:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum