Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932304 - >=sys-devel/llvm-18.1.5-r1 crashes LLD when compiling Linux kernel with LLVM=1 and selecting -march for any AMD Zen
Summary: >=sys-devel/llvm-18.1.5-r1 crashes LLD when compiling Linux kernel with LLVM=...
Status: RESOLVED DUPLICATE of bug 931130
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-20 14:45 UTC by Jorge López
Modified: 2024-05-20 16:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorge López 2024-05-20 14:45:05 UTC
This is an upstream issue, which is already being worked on. Any LLVM>=18 makes LLD crash when building a kernel with LLVM=1 and selecting AMD Zen optimizations. All znver options are affected.

I created a small repo with patches for both 18.1.5-r1 and 18.1.6 which just cherry-pick two commits, after putting those in the Portage patches folder, both versions of LLVM are able to compile the kernel again.

My repo with the patches is at github.com/LtdJorge/llvm-patches. There's more info included in the readme, regarding the issues, PRs and commits, together with instructions to apply the patches for any user that would need them.

The patches apply cleanly on top of the packaged LLVM (I assumed the ebuilds are built from the llvmorg-18.1.5 and llvmorg-18.1.6 tags, as I couldn't determine it from the ebuild file, so I used those as base and cherry-picked the commits on top).

Any Gentoo devs, feel free to take the patches or whatever is needed.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-05-20 16:12:17 UTC
Are these changes marked for backporting to 18.x branch upstream?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-20 16:26:22 UTC

*** This bug has been marked as a duplicate of bug 931130 ***
Comment 3 Jorge López 2024-05-20 16:51:52 UTC
Thanks Sam, I tried to find an already open bug but couldn't find any. I will post my patches on the other bug, in case anyone wants the easier fix.