diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-16 03:37:09 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 13:01:21 -0400 |
commit | ce99d0bf312daf0178e640da9e3c93b773a67e7d (patch) | |
tree | 8fe9c4fcae4fb441918f4a00133a5650d9e9ab79 /Makefile | |
parent | bd0f98eba6840d99b791b36a01b83fc62d55235f (diff) |
kbuild: clear LDFLAGS in the top Makefile
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 <yamada.masahiro@socionext.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -435,6 +435,7 @@ KBUILD_CFLAGS_KERNEL := | |||
435 | KBUILD_AFLAGS_MODULE := -DMODULE | 435 | KBUILD_AFLAGS_MODULE := -DMODULE |
436 | KBUILD_CFLAGS_MODULE := -DMODULE | 436 | KBUILD_CFLAGS_MODULE := -DMODULE |
437 | KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds | 437 | KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds |
438 | LDFLAGS := | ||
438 | GCC_PLUGINS_CFLAGS := | 439 | GCC_PLUGINS_CFLAGS := |
439 | 440 | ||
440 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 441 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |