<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62464>62464</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Kernel 6.3 won't boot compiled with CC="clang" KCFLAGS="-march=bdver4"
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
goverp
</td>
</tr>
</table>
<pre>
This may be too far over the bleeding edge! I've been compiling the Linux kernel with Clang and KCFLAGS="-march=bdver4" and LTO=thin since the kernel started included LTO as a config setting, using the standard sources from kernel.org or git. That said, as far as the kernel people are concerned, this is unsupported. I'm happy if you say "not supported here either", but I'm reporting it in case it's of interest. The simple bypass of removing the KCFLAGS override cures the problem - the resulting kernel boots (from GRUB2, on a UEFI system), and my Gentoo system comes up as normal.
It was working OK up to kernel 6.2.11, but on 6.3, it boots to a blank screen, dead keyboard, no flashing lights, no logs, no terminal output, and as far as I can tell no dumps. The bypass above proves it is not a framebuffer issue.
I'm cross-compiling from a desktop (Zen3 cpu) using clang v15.0.7, for an AMD A9-9420 RADEON R5. The kernel config says "Processor family (Opteron/Athlon64/Hammer/K8)", and has no experimental patches or expert settings. It's not using the EFI stub.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVMFy4zYM_Rr6grFGomRbPvjgjddpJmnTSbOX3iAJkthQpIYgnfXfd0jLTXvqxZYICHx47wHIrAZDdBCbb2JzWmHwo3WHwV7IzavGdtfD-6gYJrxCQ-CthR4dxDD4kaDRRJ0yA1A3kJAFPAm5uxA0RAZaO81Kx2hMfVEm_IQPcoY0fCo_woNGMwCaDp4fzi_Hxz9EeRJSrid07SjKU9NdyFVCypTz8v4qypMflQFWpqVUdCnHHp2nDpRpdegoJQMyILTW9GoAJu-VGYR8gMB3ROzRdOg6YBtcSwy9s9NSMrNuAOtgUD4DeB_RA6PqYgHkxAHyvxHMZGdNgI7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