From: Masahiro Yamada Date: Fri, 16 Mar 2018 07:37:09 +0000 (+0900) Subject: kbuild: clear LDFLAGS in the top Makefile X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=87734c7c9a669d394ed49b55e5616f3970f0d308;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git kbuild: clear LDFLAGS in the top Makefile commit ce99d0bf312daf0178e640da9e3c93b773a67e7d upstream. 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 Acked-by: Nicolas Pitre Signed-off-by: Greg Kroah-Hartman --- diff --git a/Makefile b/Makefile index facf917dd05b..0d23c64173ca 100644 --- a/Makefile +++ b/Makefile @@ -426,6 +426,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 := CLANG_FLAGS :=