]> Git Repo - linux.git/commitdiff
kbuild: clear LDFLAGS in the top Makefile
authorMasahiro Yamada <[email protected]>
Fri, 16 Mar 2018 07:37:09 +0000 (16:37 +0900)
committerMasahiro Yamada <[email protected]>
Sun, 25 Mar 2018 17:01:21 +0000 (02:01 +0900)
Currently LDFLAGS is not cleared, so same flags are accumulated in
LDFLAGS when the top Makefile is recursively invoked.

I found unneeded rebuild for ARCH=arm64 when CONFIG_TRIM_UNUSED_KSYMS
is enabled.  If include/generated/autoksyms.h is updated, the top
Makefile is recursively invoked, then arch/arm64/Makefile adds one
more '-maarch64linux'.  Due to the command line change, modules are
rebuilt needlessly.

Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Nicolas Pitre <[email protected]>
Makefile

index bfd09bc0da91c8190b412bc2a30c93c4a6062a82..37574e3d21fecf9880e2e9aeef207b7ab52e4d54 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -435,6 +435,7 @@ KBUILD_CFLAGS_KERNEL :=
 KBUILD_AFLAGS_MODULE  := -DMODULE
 KBUILD_CFLAGS_MODULE  := -DMODULE
 KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+LDFLAGS :=
 GCC_PLUGINS_CFLAGS :=
 
 export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
This page took 0.056462 seconds and 4 git commands to generate.