diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-01-18 02:14:35 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-24 08:36:54 +0100 |
commit | 59e2355bdfc504c22769494c265514f622127ded (patch) | |
tree | 52aec204fb11671f0446c5fb5d32b82171d928b4 /COPYING | |
parent | ba6ad897c3dc7b30b13605b404db61e427e1f47d (diff) |
kbuild: use -S instead of -E for precise cc-option test in Kconfig
[ Upstream commit 3bed1b7b9d79ca40e41e3af130931a3225e951a3 ]
Currently, -E (stop after the preprocessing stage) is used to check
whether the given compiler flag is supported.
While it is faster than -S (or -c), it can be false-positive. You need
to run the compilation proper to check the flag more precisely.
For example, -E and -S disagree about the support of
"--param asan-instrument-allocas=1".
$ gcc -Werror --param asan-instrument-allocas=1 -E -x c /dev/null -o /dev/null
$ echo $?
0
$ gcc -Werror --param asan-instrument-allocas=1 -S -x c /dev/null -o /dev/null
cc1: error: invalid --param name ‘asan-instrument-allocas’; did you mean ‘asan-instrument-writes’?
$ echo $?
1
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions