doc: use KCFLAGS instead of EXTRA_CFLAGS to pass flags from command line
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 21 Feb 2021 15:25:24 +0000 (00:25 +0900)
committerJonathan Corbet <corbet@lwn.net>
Mon, 22 Feb 2021 20:59:10 +0000 (13:59 -0700)
commit163ba35ff3714d7ccb57f7e4bc2bb44365c343a0
treedf0a8647021045bbf7b5fd2d4abbc4cb4996ee5f
parent93ea4a0b8fce5c6496e58a6392714469cef864db
doc: use KCFLAGS instead of EXTRA_CFLAGS to pass flags from command line

You should use KCFLAGS to pass additional compiler flags from the
command line. Using EXTRA_CFLAGS is wrong.

EXTRA_CFLAGS is supposed to specify flags applied only to the current
Makefile (and now deprecated in favor of ccflags-y).

It is still used in arch/mips/kvm/Makefile (and possibly in external
modules too). Passing EXTRA_CFLAGS from the command line overwrites
it and breaks the build.

I also fixed drivers/gpu/drm/tilcdc/Makefile because commit 816175dd1fd7
("drivers/gpu/drm/tilcdc: Makefile, only -Werror when no -W* in
EXTRA_CFLAGS") was based on the same misunderstanding.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Alex Shi <alex.shi@linux.alibaba.com>
Acked-by: Federico Vaga <federico.vaga@vaga.pv.it>
Link: https://lore.kernel.org/r/20210221152524.197693-1-masahiroy@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/process/4.Coding.rst
Documentation/process/submit-checklist.rst
Documentation/translations/it_IT/process/4.Coding.rst
Documentation/translations/it_IT/process/submit-checklist.rst
Documentation/translations/zh_CN/process/4.Coding.rst
drivers/gpu/drm/tilcdc/Makefile