mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Willy Tarreau <w@1wt.eu>, Alexei Starovoitov <ast@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/nolibc: always use 64-bit mode for s390 header checks
Date: Wed, 3 Dec 2025 20:23:36 +0100	[thread overview]
Message-ID: <20251203192336.19702A2c-hca@linux.ibm.com> (raw)
In-Reply-To: <20251203-nolibc-headers-check-s390-v1-1-5d35e52a83ba@weissschuh.net>

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>

  reply	other threads:[~2025-12-03 19:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 19:08 Thomas Weißschuh
2025-12-03 19:23 ` Heiko Carstens [this message]
2025-12-03 19:32 ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251203192336.19702A2c-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=arnd@arndb.de \
    --cc=ast@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®