[tip: timers/vdso] s390: Add -m64 to KBUILD_CPPFLAGS

tip-bot2 for Thomas Weißschuh posted 1 patch 3 weeks, 6 days ago
arch/s390/Makefile | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[tip: timers/vdso] s390: Add -m64 to KBUILD_CPPFLAGS
Posted by tip-bot2 for Thomas Weißschuh 3 weeks, 6 days ago
The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     08b5dcb6139975f3fd754c27f4943720c3c43ae2
Gitweb:        https://git.kernel.org/tip/08b5dcb6139975f3fd754c27f4943720c3c43ae2
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Mon, 02 Mar 2026 08:58:39 +01:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Wed, 11 Mar 2026 10:15:42 +01:00

s390: Add -m64 to KBUILD_CPPFLAGS

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index d78ad68..02bc948 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -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