mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 01:50:54 +07:00
kbuild: use $(CC_VERSION_TEXT) to evaluate CC_IS_GCC and CC_IS_CLANG
The result of '$(CC) --version | head -n 1' has already been computed by the top Makefile, and stored in the environment variable, CC_VERSION_TEXT. 'echo' is cheaper than the two commands $(CC) and 'head' although this optimization is not noticeable level. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Nathan Chancellor <natechancellor@gmail.com>
This commit is contained in:
parent
081b4b54ff
commit
e33ae3ed33
@ -9,7 +9,7 @@ config DEFCONFIG_LIST
|
||||
default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)"
|
||||
|
||||
config CC_IS_GCC
|
||||
def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
|
||||
def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
|
||||
|
||||
config GCC_VERSION
|
||||
int
|
||||
@ -21,7 +21,7 @@ config LD_VERSION
|
||||
default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
|
||||
|
||||
config CC_IS_CLANG
|
||||
def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
|
||||
def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang)
|
||||
|
||||
config CLANG_VERSION
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user