Thread (25 messages) 25 messages, 4 authors, 2026-02-20

Re: [PATCH v2 01/10] kbuild: don't enable CC_CAN_LINK if the dummy program generates warnings

From: Nicolas Schier <nsc@kernel.org>
Date: 2025-11-12 20:03:38
Also in: linux-kbuild, linux-mips, linux-riscv, linux-s390, lkml, sparclinux

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 <redacted>
---
 scripts/cc-can-link.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Nicolas Schier <nsc@kernel.org>

-- 
Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help