linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Nicolas Schier <nicolas.schier@linux.dev>,
	Nicolas Schier <nsc@kernel.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andreas Larsson <andreas@gaisler.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, linux-mips@vger.kernel.org,
	sparclinux@vger.kernel.org
Subject: Re: [PATCH v2 01/10] kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings
Date: Thu, 13 Nov 2025 21:27:41 -0700	[thread overview]
Message-ID: <20251114042741.GA3582402@ax162> (raw)
In-Reply-To: <20251014-kbuild-userprogs-bits-v2-1-faeec46e887a@linutronix.de>

On Tue, Oct 14, 2025 at 03:05:16PM +0200, Thomas Weißschuh wrote:
> It is possible that the kernel toolchain generates warnings when used
> together with the system toolchain. This happens for example when the
> older kernel toolchain does not handle new versions of sframe debug
> information. While these warnings where ignored during the evaluation
> of CC_CAN_LINK, together with CONFIG_WERROR the actual userprog build
> will later fail.
> 
> Example warning:
> 
> .../x86_64-linux/13.2.0/../../../../x86_64-linux/bin/ld:
> error in /lib/../lib64/crt1.o(.sframe); no .sframe will be created
> collect2: error: ld returned 1 exit status
> 
> Make sure that the very simple example program does not generate
> warnings already to avoid breaking the userprog compilations.
> 
> Fixes: ec4a3992bc0b ("kbuild: respect CONFIG_WERROR for linker and assembler")
> Fixes: 3f0ff4cc6ffb ("kbuild: respect CONFIG_WERROR for userprogs")
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>

While this makes sense as a way to immediately fix the problem and align
cc-can-link.sh with the other test functions like cc-option and like, it
is rather unfortunate that this particular warning causes an error since
the rest of the userprogs infrastructure does not care about SFrame...
I wonder if there is a way to avoid it since I think this warning does
not point to a fundamental problem.

> ---
>  scripts/cc-can-link.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/cc-can-link.sh b/scripts/cc-can-link.sh
> index 6efcead3198989d2ab2ab6772c72d8bb61c89c4e..e67fd8d7b6841e53341045b28dc5196cc1327cbe 100755
> --- a/scripts/cc-can-link.sh
> +++ b/scripts/cc-can-link.sh
> @@ -1,7 +1,7 @@
>  #!/bin/sh
>  # SPDX-License-Identifier: GPL-2.0
>  
> -cat << "END" | $@ -x c - -o /dev/null >/dev/null 2>&1
> +cat << "END" | $@ -Werror -Wl,--fatal-warnings -x c - -o /dev/null >/dev/null 2>&1
>  #include <stdio.h>
>  int main(void)
>  {
> 
> -- 
> 2.51.0
> 


  parent reply	other threads:[~2025-11-14  4:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 13:05 [PATCH v2 00/10] kbuild: userprogs: introduce architecture-specific CC_CAN_LINK and userprog flags Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 01/10] kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings Thomas Weißschuh
2025-11-12 19:55   ` Nicolas Schier
2025-11-14  4:27   ` Nathan Chancellor [this message]
2025-11-14 13:43     ` Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 02/10] init: deduplicate cc-can-link.sh invocations Thomas Weißschuh
2025-11-12 19:56   ` Nicolas Schier
2025-11-14  4:28   ` Nathan Chancellor
2025-10-14 13:05 ` [PATCH v2 03/10] kbuild: allow architectures to override CC_CAN_LINK Thomas Weißschuh
2025-11-12 19:56   ` Nicolas Schier
2025-11-13  9:22     ` Thomas Weißschuh
2025-11-14  4:31   ` Nathan Chancellor
2025-10-14 13:05 ` [PATCH v2 04/10] riscv: Implement custom CC_CAN_LINK Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 05/10] s390: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 06/10] powerpc: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 07/10] MIPS: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 08/10] x86/Kconfig: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 09/10] sparc: " Thomas Weißschuh
2025-10-14 13:05 ` [PATCH v2 10/10] kbuild: simplify CC_CAN_LINK Thomas Weißschuh
2025-11-12 19:56   ` Nicolas Schier
2025-11-12 20:03 ` [PATCH v2 00/10] kbuild: userprogs: introduce architecture-specific CC_CAN_LINK and userprog flags Nicolas Schier
2025-11-13  9:31   ` Thomas Weißschuh
2025-11-14  4:22     ` Nathan Chancellor
2025-12-19  8:10 ` patchwork-bot+linux-riscv

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=20251114042741.GA3582402@ax162 \
    --to=nathan@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=alex@ghiti.fr \
    --cc=andreas@gaisler.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=christophe.leroy@csgroup.eu \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=masahiroy@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=nicolas.schier@linux.dev \
    --cc=npiggin@gmail.com \
    --cc=nsc@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).