[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1001083: linux-headers-5.16.0-rc3-common: KBUILD_CFLAGS contains quoted string "-Wimplicit-fallthrough=5"



Source: linux
Version: 5.16~rc3-1~exp1
Severity: important
Control: block 1001007 with -1

KBUILD_CFLAGS in 5.16 contains a quoted string, and at some point of
passing the flags through the build system of the kernel and third
party modules, the quotes get "protected" and finally passed as part of
an argument to gcc, which fails with

gcc-11: error: "-Wimplicit-fallthrough=5": linker input file not found: No such file or directory

This has so far been reported for the nvidia kernel module (#1001007),
but I would expect that it can happen for other modules as well.

The origin of this quoted value: it's a quoted string in .config:

/usr/src/linux-headers-5.16.0-rc3-amd64/.config:CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
/usr/src/linux-headers-5.16.0-rc3-common/Makefile:KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH)

Probably
    KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(patsubst "%",%,$(CONFIG_CC_IMPLICIT_FALLTHROUGH))
would be sufficient to fix this.


Andreas


Reply to: