Makefile: CC_IMPLICIT_FALLTHROUGH passed quoted as argument to gcc
From: Salvatore Bonaccorso
Date: Sat Dec 04 2021 - 08:13:36 EST
Hi Gustavo,
Since dee2b702bcf0 ("kconfig: Add support for -Wimplicit-fallthrough")
CONFIG_CC_IMPLICIT_FALLTHROUGH value is passed quoted to the gcc
invocation.
This appears to cause issues for (external) module builds. It was
reported in Debian for the nvidia module, cf.
https://bugs.debian.org/1001083 but might happen as well in other
cases.
Andreas suggested to replace the
KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(CONFIG_CC_IMPLICIT_FALLTHROUGH)
with
KBUILD_CFLAGS += $(KBUILD_CFLAGS-y) $(patsubst "%",%,$(CONFIG_CC_IMPLICIT_FALLTHROUGH))
Is this something you would consider doing or should the issue be
handled exclusively in the particular OOT module build case?
Regards,
Salvatore