* [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks
@ 2025-12-03 19:08 Thomas Weißschuh
2025-12-03 19:23 ` Heiko Carstens
2025-12-03 19:32 ` Willy Tarreau
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Weißschuh @ 2025-12-03 19:08 UTC (permalink / raw)
To: Willy Tarreau, Alexei Starovoitov, Heiko Carstens, Arnd Bergmann
Cc: linux-kernel, Thomas Weißschuh
32-bit s390 support was recently removed from nolibc.
If the compiler defaults to 32-bit during the header checks, they fail.
Make sure to always use 64-bit mode for s390 heafer checks.
Fixes: 169ebcbb9082 ("tools: Remove s390 compat support")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
| 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index 143c2d2c2ba6..ecc660a2433c 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -107,9 +107,12 @@ headers_standalone: headers
$(Q)$(MAKE) -C $(srctree) headers
$(Q)$(MAKE) -C $(srctree) headers_install INSTALL_HDR_PATH=$(OUTPUT)sysroot
+CFLAGS_s390 := -m64
+CFLAGS := $(CFLAGS_$(ARCH))
+
headers_check: headers_standalone
$(Q)for header in $(filter-out crt.h std.h,$(all_files)); do \
- $(CC) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
+ $(CC) $(CFLAGS) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
-I$(or $(objtree),$(srctree))/usr/include -include $$header -include $$header || exit 1; \
done
---
base-commit: 4edd0eacb71563ec46338bbd59d45213ed5257a7
change-id: 20251203-nolibc-headers-check-s390-0afd32ab4209
Best regards,
--
Thomas Weißschuh <linux@weissschuh.net>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks
2025-12-03 19:08 [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks Thomas Weißschuh
@ 2025-12-03 19:23 ` Heiko Carstens
2025-12-03 19:32 ` Willy Tarreau
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2025-12-03 19:23 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Willy Tarreau, Alexei Starovoitov, Arnd Bergmann, linux-kernel
On Wed, Dec 03, 2025 at 08:08:00PM +0100, Thomas Weißschuh wrote:
> 32-bit s390 support was recently removed from nolibc.
> If the compiler defaults to 32-bit during the header checks, they fail.
>
> Make sure to always use 64-bit mode for s390 heafer checks.
>
> Fixes: 169ebcbb9082 ("tools: Remove s390 compat support")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> tools/include/nolibc/Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
> index 143c2d2c2ba6..ecc660a2433c 100644
> --- a/tools/include/nolibc/Makefile
> +++ b/tools/include/nolibc/Makefile
> @@ -107,9 +107,12 @@ headers_standalone: headers
> $(Q)$(MAKE) -C $(srctree) headers
> $(Q)$(MAKE) -C $(srctree) headers_install INSTALL_HDR_PATH=$(OUTPUT)sysroot
>
> +CFLAGS_s390 := -m64
> +CFLAGS := $(CFLAGS_$(ARCH))
> +
> headers_check: headers_standalone
> $(Q)for header in $(filter-out crt.h std.h,$(all_files)); do \
> - $(CC) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
> + $(CC) $(CFLAGS) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
> -I$(or $(objtree),$(srctree))/usr/include -include $$header -include $$header || exit 1; \
> done
I wasn't even aware that anybody would build a compiler which defaults
to 32 bit, until Arnd pointed this out. Anyway:
Acked-by: Heiko Carstens <hca@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks
2025-12-03 19:08 [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks Thomas Weißschuh
2025-12-03 19:23 ` Heiko Carstens
@ 2025-12-03 19:32 ` Willy Tarreau
1 sibling, 0 replies; 3+ messages in thread
From: Willy Tarreau @ 2025-12-03 19:32 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: Alexei Starovoitov, Heiko Carstens, Arnd Bergmann, linux-kernel
Hi Thomas,
On Wed, Dec 03, 2025 at 08:08:00PM +0100, Thomas Weißschuh wrote:
> 32-bit s390 support was recently removed from nolibc.
> If the compiler defaults to 32-bit during the header checks, they fail.
>
> Make sure to always use 64-bit mode for s390 heafer checks.
>
> Fixes: 169ebcbb9082 ("tools: Remove s390 compat support")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
> tools/include/nolibc/Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
> index 143c2d2c2ba6..ecc660a2433c 100644
> --- a/tools/include/nolibc/Makefile
> +++ b/tools/include/nolibc/Makefile
> @@ -107,9 +107,12 @@ headers_standalone: headers
> $(Q)$(MAKE) -C $(srctree) headers
> $(Q)$(MAKE) -C $(srctree) headers_install INSTALL_HDR_PATH=$(OUTPUT)sysroot
>
> +CFLAGS_s390 := -m64
> +CFLAGS := $(CFLAGS_$(ARCH))
> +
> headers_check: headers_standalone
> $(Q)for header in $(filter-out crt.h std.h,$(all_files)); do \
> - $(CC) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
> + $(CC) $(CFLAGS) $(CLANG_CROSS_FLAGS) -Wall -Werror -nostdinc -fsyntax-only -x c /dev/null \
> -I$(or $(objtree),$(srctree))/usr/include -include $$header -include $$header || exit 1; \
> done
>
Interesrting, it reminded me something, I was sure that we had been
forcing that one earlier for the case of compilers defaulting to 32-bits,
but maybe that was a side effect of us forcing it on other archs. Ah I've
found it now it's the commit that introduced s390 support in fact that
Brought -m64 from the start, and it was for the test suite:
0043e6f21dbe ("selftests/nolibc: add s390 support")
In any case I'm now seeing that Heiko confirmed it as well, so FWIW:
Acked-by: Willy Tarreau <w@1wt.eu>
Thanks,
Willy
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-03 19:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-03 19:08 [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks Thomas Weißschuh
2025-12-03 19:23 ` Heiko Carstens
2025-12-03 19:32 ` Willy Tarreau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®