Re: Failing to build mainline kernel for arm

From: Arnd Bergmann
Date: Tue Jun 17 2025 - 17:36:51 EST


On Tue, Jun 17, 2025, at 23:23, Brahmajit Das wrote:
> Hello developers,
>
> I was trying to build the mainline kernel (top commit
> 4663747812d1a272312d1b95cbd128f0cdb329f2) and came across a build
> failure with allyesconfig.
>
> $ make ARCH=arm CROSS_COMPILE=arm-none-eabi-

The problem is likely that you use a baremetal toolchain, rather
than an arm-linux-gnueabi or arm-linux-gnueabihi toolchain.

There is some logic that tries to decide if uint32_t should
be 'unsigned int' or 'unsigned long' based on included headers,
and it seems that your compiler comes to a different conclusion
here.

If this is a freestanding compiler, can you try adding
-fno-freestanding to the cflags?

Arnd