Kernel crosscompilers

Christophe Leroy christophe.leroy at
Sat May 8 16:46:04 AEST 2021

Le 06/05/2021 à 16:17, Arnd Bergmann a écrit :
> On Thu, May 6, 2021 at 2:42 PM Christophe Leroy
> <christophe.leroy at> wrote:
>> Hello Arnd,
>> May I ask you whether you plan to build cross compilers based on GCC 11.1 at
>> ?
> Hi Christophe,
> I've built a snapshot a few days before the release, that one is
> identical to 11.1
> except for the reported version number. I've tried to ask around for
> help testing
> this, but so far I have not heard from anyone.
> Building a new set of compilers takes around a day on my build box, so I want
> to make sure I don't have to do it more often than necessary. If you are able
> to give the binaries a spin, preferably on a ppc64le or arm64 host, please let
> me know how it goes and I'll rebuilt them on the release tag.

Hi Arnd,

I don't have any ppc or arm host I can build on.
I'm building on x86 for powerpc embedded boards.

I have tried your GCC 11 snapshot, I get something booting but it crashes when launching init.

[    7.368410] init[1]: bad frame in sys_sigreturn: 7fb2fd60 nip 001083cc lr 001083c4
[    7.376283] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    7.383680] CPU: 0 PID: 1 Comm: init Not tainted 5.12.0-s3k-dev-16316-g9e799d5df185 #5054
[    7.391767] Call Trace:
[    7.394174] [c9023db0] [c00211e8] panic+0x130/0x304 (unreliable)
[    7.400112] [c9023e10] [c0024e68] do_exit+0x874/0x910
[    7.405104] [c9023e50] [c0024f80] do_group_exit+0x40/0xc4
[    7.410440] [c9023e60] [c0033334] get_signal+0x1d8/0x93c
[    7.415689] [c9023ec0] [c0007f34] do_notify_resume+0x6c/0x314
[    7.421369] [c9023f20] [c000d580] syscall_exit_prepare+0x120/0x184
[    7.427479] [c9023f30] [c001101c] ret_from_syscall+0xc/0x28

Something is going wrong with asm goto output. I implemented get_user() helpers with asm goto this 
cycle (commit 5cd29b1fd3e8). I tested it with CLANG before submitting, it was working.

Seems like there is something wrong with it with GCC11. When forcing CONFIG_CC_HAS_ASM_GOTO_OUTPUT 
to 'n', the kernel boots ok.


More information about the Linuxppc-dev mailing list