[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220823080037.829968607@linuxfoundation.org>
Date: Tue, 23 Aug 2022 10:03:59 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Nicolas Pitre <nico@...aro.org>
Subject: [PATCH 4.9 086/101] kbuild: clear LDFLAGS in the top Makefile
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
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 <yamada.masahiro@...ionext.com>
Acked-by: Nicolas Pitre <nico@...aro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
--- a/Makefile
+++ b/Makefile
@@ -395,6 +395,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 :=
Powered by blists - more mailing lists