]> git.baikalelectronics.ru Git - kernel.git/commit
Makefile: reuse CC_VERSION_TEXT
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 5 Feb 2021 22:01:25 +0000 (14:01 -0800)
committerMasahiro Yamada <masahiroy@kernel.org>
Wed, 24 Feb 2021 06:11:17 +0000 (15:11 +0900)
commit7f099d4551983989a924b60165eab690378b8f7b
treeb69799d84344cbf543cbf5b810c56e7c2f93d18c
parent95382331705e1391410152cbec85bec6fd97b827
Makefile: reuse CC_VERSION_TEXT

I noticed we're invoking $(CC) via $(shell) more than once to check the
version.  Let's reuse the first string captured in $CC_VERSION_TEXT.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
[masahiro.yamada:
CC_VERSION_TEXT is assigned by = instead of :=, so this $(shell ) is
evaluated multiple times anyway. The number of $(CC) invocations will
be still the same. Replacing 'grep' with the built-in $(findstring )
will give real performance benefit.]
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile