]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Aug 2022 07:00:46 +0000 (09:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Aug 2022 07:00:46 +0000 (09:00 +0200)
added patches:
kbuild-clear-ldflags-in-the-top-makefile.patch

queue-4.9/kbuild-clear-ldflags-in-the-top-makefile.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/kbuild-clear-ldflags-in-the-top-makefile.patch b/queue-4.9/kbuild-clear-ldflags-in-the-top-makefile.patch
new file mode 100644 (file)
index 0000000..b23f1d7
--- /dev/null
@@ -0,0 +1,35 @@
+From ce99d0bf312daf0178e640da9e3c93b773a67e7d Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+Date: Fri, 16 Mar 2018 16:37:09 +0900
+Subject: kbuild: clear LDFLAGS in the top Makefile
+
+From: Masahiro Yamada <yamada.masahiro@socionext.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@socionext.com>
+Acked-by: Nicolas Pitre <nico@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 :=
index c19972d882a57ed00f7f3b3dd6760bd4a4cd2054..1ab3b96c1a7ecbe58b921db85b3f0e2bcfaec8db 100644 (file)
@@ -83,6 +83,7 @@ nios2-restarts-apply-only-to-the-first-sigframe-we-build.patch
 nios2-add-force_successful_syscall_return.patch
 netfilter-nf_tables-really-skip-inactive-sets-when-allocating-name.patch
 fec-fix-timer-capture-timing-in-fec_ptp_enable_pps.patch
+kbuild-clear-ldflags-in-the-top-makefile.patch
 irqchip-tegra-fix-overflow-implicit-truncation-warni.patch
 usb-host-ohci-ppc-of-fix-refcount-leak-bug.patch
 gadgetfs-ep_io-wait-until-irq-finishes.patch