mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
UPSTREAM: Makefile: Remove # characters from compiler string
When using AMD's Optimizing C/C++ Compiler (AOCC), the build fails due to a # character in the version string, which is interpreted as a comment: $ make CC=clang defconfig init/main.o include/config/auto.conf.cmd:1374: *** invalid syntax in conditional. Stop. $ sed -n 1374p include/config/auto.conf.cmd ifneq "$(CC_VERSION_TEXT)" "AMD clang version 11.0.0 (CLANG: AOCC_2.3.0-Build#85 2020_11_10) (based on LLVM Mirror.Version.11.0.0)" Remove all # characters in the version string so that the build does not fail unexpectedly. Link: https://github.com/ClangBuiltLinux/linux/issues/1298 Reported-by: Michael Fuckner <michael@fuckner.net> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> (cherry picked from commit c75173a26948363bdd11a0d5b90bd012ce4cc2e7) Bug: 209655537 Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Change-Id: Ie2ba7041325f13865b59b43517111674519ce386
This commit is contained in:
parent
55b29ae177
commit
ca79c1a408
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -557,7 +557,7 @@ 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 = $(shell $(CC) --version 2>/dev/null | head -n 1)
|
||||
CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1 | sed 's/\#//g')
|
||||
|
||||
ifneq ($(findstring clang,$(CC_VERSION_TEXT)),)
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
|
|
|
|||
Loading…
Reference in a new issue