]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390: Add -m64 to KBUILD_CPPFLAGS
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Mon, 2 Mar 2026 07:58:39 +0000 (08:58 +0100)
committerThomas Gleixner <tglx@kernel.org>
Wed, 11 Mar 2026 09:15:42 +0000 (10:15 +0100)
Some non-code files, like linkescripts, are preprocessed with the C
preprocessor and make use of regular kernel headers.
As -m64 is not passed to those preprocessor invocations this leads
to an inconsistency between __BITS_PER_LONG and the C type 'long'.
An upcoming consistency check will be tripped by this.

Make sure -m64 is also defined for those preprocessing steps.

As KBUILD_CPPFLAGS is inherited by both KBUILD_AFLAGS and KBUILD_CFLAGS,
drop -m64 from these variables.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260302-vdso-compat-checkflags-v2-3-78e55baa58ba@linutronix.de
arch/s390/Makefile

index d78ad6885ca2a4c137d45be070c4688940aa4a6f..02bc948a4a56f87a734591ecd367ee8071e10fff 100644 (file)
@@ -12,8 +12,7 @@ LD_BFD                := elf64-s390
 KBUILD_LDFLAGS := -m elf64_s390
 KBUILD_AFLAGS_MODULE += -fPIC
 KBUILD_CFLAGS_MODULE += -fPIC
-KBUILD_AFLAGS  += -m64
-KBUILD_CFLAGS  += -m64
+KBUILD_CPPFLAGS        += -m64
 KBUILD_CFLAGS  += -fPIC
 LDFLAGS_vmlinux        := $(call ld-option,-no-pie)
 extra_tools    := relocs