* [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works
@ 2025-10-09 7:51 Askar Safin
2025-10-09 8:02 ` Askar Safin
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Askar Safin @ 2025-10-09 7:51 UTC (permalink / raw)
To: linux-kbuild, Masahiro Yamada, regressions
Cc: nathan, linux-kernel, miguel.ojeda.sandonis, nsc, ojeda, sam,
thomas.weissschuh, Daniel Xu
#regzbot introduced: d1d0963121769d8d16150b913fe886e48efefa51
As well as I understand, if you want to disable warnings, you
should pass "CFLAGS=-w" to "make". Starting with d1d096312176,
this no longer works.
Steps to reproduce:
$ cd linux
$ git clean -f -q -d -x # To clean everything not controlled by git
$ echo 'CONFIG_64BIT=y' > /tmp/minimini
$ make allnoconfig KCONFIG_ALLCONFIG=/tmp/minimini
$ make -j32 CFLAGS=-w
My system info:
d-user@comp:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/14/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 14.2.0-19' --with-bugurl=file:///usr/share/doc/gcc-14/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2,rust --prefix=/usr --with-gcc-major-version-only --program-suffix=-14 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/reproducible-path/gcc-14-14.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=3
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (Debian 14.2.0-19)
d-user@comp:~$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.1
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Culpit commit (d1d096312176) produces this output:
d-user@comp:/rbt$ cd linux
d-user@comp:/rbt/linux$ git clean -f -q -d -x
d-user@comp:/rbt/linux$ echo 'CONFIG_64BIT=y' > /tmp/minimini
d-user@comp:/rbt/linux$ make allnoconfig KCONFIG_ALLCONFIG=/tmp/minimini
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
HOSTCC scripts/kconfig/parser.tab.o
HOSTCC scripts/kconfig/preprocess.o
HOSTCC scripts/kconfig/symbol.o
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
d-user@comp:/rbt/linux$ make -j32 CFLAGS=-w
GEN arch/x86/include/generated/asm/orc_hash.h
WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h
WRAP arch/x86/include/generated/uapi/asm/errno.h
WRAP arch/x86/include/generated/uapi/asm/fcntl.h
UPD include/generated/uapi/linux/version.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
WRAP arch/x86/include/generated/uapi/asm/ioctl.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
WRAP arch/x86/include/generated/uapi/asm/ioctls.h
WRAP arch/x86/include/generated/uapi/asm/ipcbuf.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
WRAP arch/x86/include/generated/uapi/asm/param.h
SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h
WRAP arch/x86/include/generated/uapi/asm/poll.h
WRAP arch/x86/include/generated/uapi/asm/resource.h
SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h
WRAP arch/x86/include/generated/uapi/asm/socket.h
SYSTBL arch/x86/include/generated/asm/syscalls_64.h
WRAP arch/x86/include/generated/uapi/asm/sockios.h
WRAP arch/x86/include/generated/uapi/asm/termbits.h
WRAP arch/x86/include/generated/uapi/asm/termios.h
WRAP arch/x86/include/generated/uapi/asm/types.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
UPD include/generated/compile.h
WRAP arch/x86/include/generated/asm/early_ioremap.h
WRAP arch/x86/include/generated/asm/fprobe.h
HOSTCC scripts/kallsyms
WRAP arch/x86/include/generated/asm/mcs_spinlock.h
WRAP arch/x86/include/generated/asm/mmzone.h
HOSTCC scripts/sorttable
WRAP arch/x86/include/generated/asm/irq_regs.h
WRAP arch/x86/include/generated/asm/kmap_size.h
WRAP arch/x86/include/generated/asm/local64.h
WRAP arch/x86/include/generated/asm/mmiowb.h
WRAP arch/x86/include/generated/asm/module.lds.h
UPD include/config/kernel.release
WRAP arch/x86/include/generated/asm/rwonce.h
DESCEND objtool
UPD include/generated/utsrelease.h
INSTALL /rbt/linux/tools/objtool/libsubcmd/include/subcmd/exec-cmd.h
INSTALL /rbt/linux/tools/objtool/libsubcmd/include/subcmd/help.h
INSTALL /rbt/linux/tools/objtool/libsubcmd/include/subcmd/pager.h
INSTALL /rbt/linux/tools/objtool/libsubcmd/include/subcmd/parse-options.h
INSTALL /rbt/linux/tools/objtool/libsubcmd/include/subcmd/run-command.h
INSTALL libsubcmd_headers
HOSTLD arch/x86/tools/relocs
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
CC scripts/mod/devicetable-offsets.s
CC /rbt/linux/tools/objtool/libsubcmd/exec-cmd.o
CC /rbt/linux/tools/objtool/libsubcmd/help.o
CC /rbt/linux/tools/objtool/libsubcmd/pager.o
CC /rbt/linux/tools/objtool/libsubcmd/parse-options.o
CC /rbt/linux/tools/objtool/libsubcmd/run-command.o
CC /rbt/linux/tools/objtool/libsubcmd/sigchain.o
CC /rbt/linux/tools/objtool/libsubcmd/subcmd-config.o
exec-cmd.c:2:10: fatal error: linux/compiler.h: No such file or directory
2 | #include <linux/compiler.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[5]: *** [/rbt/linux/tools/build/Makefile.build:86: /rbt/linux/tools/objtool/libsubcmd/exec-cmd.o] Error 1
make[5]: *** Waiting for unfinished jobs....
parse-options.c:2:10: fatal error: linux/compiler.h: No such file or directory
2 | #include <linux/compiler.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[5]: *** [/rbt/linux/tools/build/Makefile.build:86: /rbt/linux/tools/objtool/libsubcmd/parse-options.o] Error 1
In file included from sigchain.c:3:
subcmd-util.h:8:10: fatal error: linux/compiler.h: No such file or directory
8 | #include <linux/compiler.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[5]: *** [/rbt/linux/tools/build/Makefile.build:86: /rbt/linux/tools/objtool/libsubcmd/sigchain.o] Error 1
MKELF scripts/mod/elfconfig.h
In file included from help.c:12:
subcmd-util.h:8:10: fatal error: linux/compiler.h: No such file or directory
8 | #include <linux/compiler.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
HOSTCC scripts/mod/modpost.o
make[5]: *** [/rbt/linux/tools/build/Makefile.build:85: /rbt/linux/tools/objtool/libsubcmd/help.o] Error 1
HOSTCC scripts/mod/sumversion.o
In file included from run-command.c:11:
subcmd-util.h:8:10: fatal error: linux/compiler.h: No such file or directory
8 | #include <linux/compiler.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
HOSTCC scripts/mod/symsearch.o
make[5]: *** [/rbt/linux/tools/build/Makefile.build:85: /rbt/linux/tools/objtool/libsubcmd/run-command.o] Error 1
UPD scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
make[4]: *** [Makefile:78: /rbt/linux/tools/objtool/libsubcmd/libsubcmd-in.o] Error 2
make[3]: *** [Makefile:83: /rbt/linux/tools/objtool/libsubcmd/libsubcmd.a] Error 2
make[2]: *** [Makefile:73: objtool] Error 2
make[1]: *** [/rbt/linux/Makefile:1430: tools/objtool] Error 2
make[1]: *** Waiting for unfinished jobs....
HOSTLD scripts/mod/modpost
CC kernel/bounds.s
CHKSHA1 include/linux/atomic/atomic-arch-fallback.h
CHKSHA1 include/linux/atomic/atomic-instrumented.h
CHKSHA1 include/linux/atomic/atomic-long.h
UPD include/generated/timeconst.h
UPD include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
UPD include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
make: *** [Makefile:251: __sub-make] Error 2
--
Askar Safin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works
2025-10-09 7:51 [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works Askar Safin
@ 2025-10-09 8:02 ` Askar Safin
2025-10-09 8:48 ` Nicolas Schier
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Askar Safin @ 2025-10-09 8:02 UTC (permalink / raw)
To: linux-kbuild, regressions
Cc: dxu, linux-kernel, masahiroy, miguel.ojeda.sandonis, nathan, nsc,
ojeda, sam, thomas.weissschuh
The bug still reproducible with current kbuild-next (2ea77fca84f07849aa995271271340d262d0c2e9)
--
Askar Safin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works
2025-10-09 7:51 [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works Askar Safin
2025-10-09 8:02 ` Askar Safin
@ 2025-10-09 8:48 ` Nicolas Schier
2025-10-15 2:55 ` Askar Safin
2025-10-09 17:41 ` Nathan Chancellor
2025-12-03 20:05 ` Askar Safin
3 siblings, 1 reply; 6+ messages in thread
From: Nicolas Schier @ 2025-10-09 8:48 UTC (permalink / raw)
To: Askar Safin
Cc: linux-kbuild, Masahiro Yamada, regressions, nathan, linux-kernel,
miguel.ojeda.sandonis, ojeda, sam, thomas.weissschuh, Daniel Xu
On Thu, Oct 09, 2025 at 10:51:49AM +0300, Askar Safin wrote:
> #regzbot introduced: d1d0963121769d8d16150b913fe886e48efefa51
>
> As well as I understand, if you want to disable warnings, you
> should pass "CFLAGS=-w" to "make". Starting with d1d096312176,
> this no longer works.
>
> Steps to reproduce:
>
> $ cd linux
> $ git clean -f -q -d -x # To clean everything not controlled by git
> $ echo 'CONFIG_64BIT=y' > /tmp/minimini
> $ make allnoconfig KCONFIG_ALLCONFIG=/tmp/minimini
> $ make -j32 CFLAGS=-w
If you want to hand-over additional CFLAGS to kbuild you need to use
KCFLAGS or other variations, see Documentation/kbuild/kbuild.rst.
When I intentionally introduce a warning in e.g. init/main.c, I can
suppress the compiler warning by calling
make KCFLAGS=-w
Your log output below does not contain any warning, so I assume that you
actually want to point to something different.
[...]
> CC /rbt/linux/tools/objtool/libsubcmd/exec-cmd.o
> CC /rbt/linux/tools/objtool/libsubcmd/help.o
> CC /rbt/linux/tools/objtool/libsubcmd/pager.o
> CC /rbt/linux/tools/objtool/libsubcmd/parse-options.o
> CC /rbt/linux/tools/objtool/libsubcmd/run-command.o
> CC /rbt/linux/tools/objtool/libsubcmd/sigchain.o
> CC /rbt/linux/tools/objtool/libsubcmd/subcmd-config.o
> exec-cmd.c:2:10: fatal error: linux/compiler.h: No such file or directory
> 2 | #include <linux/compiler.h>
> | ^~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[5]: *** [/rbt/linux/tools/build/Makefile.build:86: /rbt/linux/tools/objtool/libsubcmd/exec-cmd.o] Error 1
> make[5]: *** Waiting for unfinished jobs....
> parse-options.c:2:10: fatal error: linux/compiler.h: No such file or directory
> 2 | #include <linux/compiler.h>
> | ^~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[5]: *** [/rbt/linux/tools/build/Makefile.build:86: /rbt/linux/tools/objtool/libsubcmd/parse-options.o] Error 1
> In file included from sigchain.c:3:
> subcmd-util.h:8:10: fatal error: linux/compiler.h: No such file or directory
> 8 | #include <linux/compiler.h>
> | ^~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[5]: *** [/rbt/linux/tools/build/Makefile.build:86: /rbt/linux/tools/objtool/libsubcmd/sigchain.o] Error 1
> MKELF scripts/mod/elfconfig.h
> In file included from help.c:12:
> subcmd-util.h:8:10: fatal error: linux/compiler.h: No such file or directory
> 8 | #include <linux/compiler.h>
> | ^~~~~~~~~~~~~~~~~~
> compilation terminated.
> HOSTCC scripts/mod/modpost.o
> make[5]: *** [/rbt/linux/tools/build/Makefile.build:85: /rbt/linux/tools/objtool/libsubcmd/help.o] Error 1
> HOSTCC scripts/mod/sumversion.o
> In file included from run-command.c:11:
> subcmd-util.h:8:10: fatal error: linux/compiler.h: No such file or directory
> 8 | #include <linux/compiler.h>
> | ^~~~~~~~~~~~~~~~~~
> compilation terminated.
> HOSTCC scripts/mod/symsearch.o
> make[5]: *** [/rbt/linux/tools/build/Makefile.build:85: /rbt/linux/tools/objtool/libsubcmd/run-command.o] Error 1
> UPD scripts/mod/devicetable-offsets.h
> HOSTCC scripts/mod/file2alias.o
> make[4]: *** [Makefile:78: /rbt/linux/tools/objtool/libsubcmd/libsubcmd-in.o] Error 2
> make[3]: *** [Makefile:83: /rbt/linux/tools/objtool/libsubcmd/libsubcmd.a] Error 2
> make[2]: *** [Makefile:73: objtool] Error 2
> make[1]: *** [/rbt/linux/Makefile:1430: tools/objtool] Error 2
> make[1]: *** Waiting for unfinished jobs....
This is reproducible on my machine:
make -C tools objtool CFLAGS=-w
But is doesn't matter which CFLAGS you add here, as they overwrite
objtool's include paths.
According to tools/build/Documentation/Build.txt you should use
different variables for everything below tools/, e.g.:
make -C tools objtool CFLAGS_objtool=-w
Does this help for your specific issue?
Kind regards,
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works
2025-10-09 7:51 [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works Askar Safin
2025-10-09 8:02 ` Askar Safin
2025-10-09 8:48 ` Nicolas Schier
@ 2025-10-09 17:41 ` Nathan Chancellor
2025-12-03 20:05 ` Askar Safin
3 siblings, 0 replies; 6+ messages in thread
From: Nathan Chancellor @ 2025-10-09 17:41 UTC (permalink / raw)
To: Askar Safin
Cc: linux-kbuild, Masahiro Yamada, regressions, linux-kernel,
miguel.ojeda.sandonis, nsc, ojeda, sam, thomas.weissschuh,
Daniel Xu
Hi Askar,
On Thu, Oct 09, 2025 at 10:51:49AM +0300, Askar Safin wrote:
> #regzbot introduced: d1d0963121769d8d16150b913fe886e48efefa51
>
> As well as I understand, if you want to disable warnings, you
> should pass "CFLAGS=-w" to "make". Starting with d1d096312176,
> this no longer works.
>
> Steps to reproduce:
>
> $ cd linux
> $ git clean -f -q -d -x # To clean everything not controlled by git
> $ echo 'CONFIG_64BIT=y' > /tmp/minimini
> $ make allnoconfig KCONFIG_ALLCONFIG=/tmp/minimini
> $ make -j32 CFLAGS=-w
As Nicolas pointed out, CFLAGS has not be hooked into Kbuild for a long
time, see commit 69ee0b352242 ("kbuild: do not pick up CFLAGS from the
environment"). You would need to use KCFLAGS=-w to accomplish the same
thing. KCFLAGS is only for the kernel build though, you would need
HOSTCFLAGS=-w as well to ignore warnings when building the host
programs such as objtool.
It does seem like the objtool Makefile should be hardened against CFLAGS
being passed in from the command line so that the build does not break
like this though.
Cheers,
Nathan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works
2025-10-09 8:48 ` Nicolas Schier
@ 2025-10-15 2:55 ` Askar Safin
0 siblings, 0 replies; 6+ messages in thread
From: Askar Safin @ 2025-10-15 2:55 UTC (permalink / raw)
To: Nicolas Schier
Cc: linux-kbuild, Masahiro Yamada, regressions, nathan, linux-kernel,
miguel.ojeda.sandonis, ojeda, sam, thomas.weissschuh, Daniel Xu
On Thu, Oct 9, 2025 at 11:49 AM Nicolas Schier <nsc@kernel.org> wrote:
> If you want to hand-over additional CFLAGS to kbuild you need to use
> KCFLAGS or other variations, see Documentation/kbuild/kbuild.rst.
Oops, I'm sorry.
#regzbot invalid: there is no bug, kbuild works as documented
--
Askar Safin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works
2025-10-09 7:51 [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works Askar Safin
` (2 preceding siblings ...)
2025-10-09 17:41 ` Nathan Chancellor
@ 2025-12-03 20:05 ` Askar Safin
3 siblings, 0 replies; 6+ messages in thread
From: Askar Safin @ 2025-12-03 20:05 UTC (permalink / raw)
To: regressions; +Cc: linux-kbuild, linux-kernel
Askar Safin <safinaskar@gmail.com>:
> #regzbot introduced: d1d0963121769d8d16150b913fe886e48efefa51
#regzbot report: https://lore.kernel.org/lkml/20251009075149.1083040-1-safinaskar@gmail.com/
#regzbot invalid: there is no bug, kbuild works as documented
--
Askar Safin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-12-03 20:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-09 7:51 [REGRESSION][BISECTED] kbuild: CFLAGS=-w no longer works Askar Safin
2025-10-09 8:02 ` Askar Safin
2025-10-09 8:48 ` Nicolas Schier
2025-10-15 2:55 ` Askar Safin
2025-10-09 17:41 ` Nathan Chancellor
2025-12-03 20:05 ` Askar Safin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox