kbuild: do not pass $(KBUILD_CFLAGS) to scripts/mkcompile_h
PATCH 1/1 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.
Signed-off-by Masahiro Yamada <[email protected]>
---
init/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
init/Makefile +1 -1
@@ -35,4 +35,4 @@ include/generated/compile.h: FORCE @$($(quiet)chk_compile.h) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \ - "$(CONFIG_PREEMPT_RT)" "$(CC) $(KBUILD_CFLAGS)" "$(LD)" + "$(CONFIG_PREEMPT_RT)" "$(CC)" "$(LD)"
Signature · 1 line
2.17.1
Quoted 5 lines · Masahiro Yamada
scripts/mkcompile_huses $(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.
I would be alarmed to find it changing the version string with flags. ;)
Quoted 5 lines
Just get rid of it.
Signed-off-by Masahiro Yamada <[email protected]>
Reviewed-by Kees Cook <[email protected]>
-Kees
Quoted 18 lines
---
init/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)init/Makefile +1
-1@@ -35,4 +35,4 @@ include/generated/compile.h: FORCE @$($(quiet)chk_compile.h) $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \ - "$(CONFIG_PREEMPT_RT)" "$(CC) $(KBUILD_CFLAGS)" "$(LD)" + "$(CONFIG_PREEMPT_RT)" "$(CC)" "$(LD)"Signature · 1 line
2.17.1
Signature · 1 line
Kees Cook