Kbuild: skip cc-wrapper while finding version info
The version check script introduced by 'commit 83f55e6f29
("kbuild: check the minimum assembler version in Kconfig")'
fails with cc-wrapper so use build tools directly to get
version details.
Change-Id: I1019b49eff5a885ad8e36a421dce6119862b0fb1
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
This commit is contained in:
parent
89c2ba9ce4
commit
00776106b7
6
Makefile
6
Makefile
@ -534,6 +534,8 @@ KBUILD_CFLAGS_MODULE := -DMODULE
|
||||
KBUILD_LDFLAGS_MODULE :=
|
||||
KBUILD_LDFLAGS :=
|
||||
CLANG_FLAGS :=
|
||||
# For use when analysis needs to call subshell with CC before cc-wrapper is built.
|
||||
NO_WRAPPER_CC := $(CC)
|
||||
|
||||
CC := scripts/basic/cc-wrapper $(CC)
|
||||
|
||||
@ -550,6 +552,7 @@ export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
|
||||
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
|
||||
export PAHOLE_FLAGS
|
||||
export NO_WRAPPER_CC
|
||||
|
||||
# Files to ignore in find ... statements
|
||||
|
||||
@ -596,7 +599,8 @@ endif
|
||||
# Some architectures define CROSS_COMPILE in arch/$(SRCARCH)/Makefile.
|
||||
# CC_VERSION_TEXT is referenced from Kconfig (so it needs export),
|
||||
# and from include/config/auto.conf.cmd to detect the compiler upgrade.
|
||||
CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1))
|
||||
# cc-wrapper may not yet be compiled, use NO_WRAPPER_CC.
|
||||
CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(NO_WRAPPER_CC) --version 2>/dev/null | head -n 1))
|
||||
|
||||
ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
|
||||
include $(srctree)/scripts/Makefile.clang
|
||||
|
@ -52,7 +52,8 @@ ld-name := $(shell,set -- $(ld-info) && echo $1)
|
||||
ld-version := $(shell,set -- $(ld-info) && echo $2)
|
||||
|
||||
# Get the assembler name, version, and error out if it is not supported.
|
||||
as-info := $(shell,$(srctree)/scripts/as-version.sh $(CC) $(CLANG_FLAGS))
|
||||
# cc-wrapper may not yet be compiled, use NO_WRAPPER_CC.
|
||||
as-info := $(shell,$(srctree)/scripts/as-version.sh $(NO_WRAPPER_CC) $(CLANG_FLAGS))
|
||||
$(error-if,$(success,test -z "$(as-info)"),Sorry$(comma) this assembler is not supported.)
|
||||
as-name := $(shell,set -- $(as-info) && echo $1)
|
||||
as-version := $(shell,set -- $(as-info) && echo $2)
|
||||
|
Loading…
Reference in New Issue
Block a user