UPSTREAM: kbuild: do not pass $(KBUILD_CFLAGS) to scripts/mkcompile_h

scripts/mkcompile_h uses $(CC) only for getting the version string.

I suspected there was a specific reason why the additional flags were
needed, and dug the commit history. This code dates back to at least
2002 [1], but I could not get any more clue.

Just get rid of it.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=29f3df7eba8ddf91a55183f9967f76fbcc3ab742

Bug: 168274246

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
(cherry picked from commit 01a6126b5f7efdf75480a2b970377f5724cb885a)
Signed-off-by: Mars Lin <marslin@google.com>
Change-Id: If887ea1e9e43b9ce83bf8fe9cc0db809818c3bb8
This commit is contained in:
Masahiro Yamada
2020-04-04 06:24:59 +09:00
committed by Hridaya Prajapati
parent f629b2faba
commit c3cc53672a

View File

@@ -33,4 +33,4 @@ include/generated/compile.h: FORCE
@$($(quiet)chk_compile.h) @$($(quiet)chk_compile.h)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \
"$(CC) $(KBUILD_CFLAGS)" "$(LD)" "$(CC)" "$(LD)"