microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 13 Sep 2026 23:50:09 +0000 (01:50 +0200)
committerMichal Simek <michal.simek@amd.com>
Mon, 14 Sep 2026 09:40:24 +0000 (11:40 +0200)
commitb9eababe8c0b9f71ce7f35f903879a7fcb6daebe
tree5d451d62a2443cde6481b3b84430dc6a2df9bc2e
parent54c35131e628e1a18f02365495a24a73a1fb515e
microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS

These parameters are also necessary for preprocessed files which do not
contain code. One example is arch/microblaze/kernel/vmlinux.lds.S which
inspects __MICROBLAZEEL__ for the definition of 'jiffies_64'.
As currently the endianness is not passed from the build system for this
file, the preprocessor will instead use the default endianness of the
toolchain. When a default big-endian toolchain is used to build a
little-endian kernel, that kernel will hang during delay calibration
as 'jiffies' never changes.

Make sure all preprocessor invocations know about the correct endianness
by passing it through KBUILD_CPPFLAGS. This will also be inherited by
CFLAGS and AFLAGS.

Fixes: 02b08045a030 ("microblaze: Add support for little-endian Microblaze")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20260914-kunit-microblaze-v2-2-7d5756e858f8@weissschuh.net
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/microblaze/Makefile