From c6f59df64650547d7db70f7b9bad482760146b6b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 26 Jan 2024 16:56:11 -0800 Subject: [PATCH] 4.19-stable patches added patches: powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch --- ...stead-of-always-y-in-for-crtsavres.o.patch | 46 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 47 insertions(+) create mode 100644 queue-4.19/powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch diff --git a/queue-4.19/powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch b/queue-4.19/powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch new file mode 100644 index 00000000000..d01190e52a5 --- /dev/null +++ b/queue-4.19/powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch @@ -0,0 +1,46 @@ +From nathan@kernel.org Fri Jan 26 16:52:20 2024 +From: Nathan Chancellor +Date: Fri, 26 Jan 2024 10:36:31 -0700 +Subject: powerpc: Use always instead of always-y in for crtsavres.o +To: gregkh@linuxfoundation.org, sashal@kernel.org +Cc: stable@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor +Message-ID: <20240126-4-19-fix-lib-powerpc-backport-v1-1-f0de224db66b@kernel.org> + +From: Nathan Chancellor + +This commit is for linux-4.19.y only, it has no direct upstream +equivalent. + +Prior to commit 5f2fb52fac15 ("kbuild: rename hostprogs-y/always to +hostprogs/always-y"), always-y did not exist, making the backport of +mainline commit 1b1e38002648 ("powerpc: add crtsavres.o to always-y +instead of extra-y") to linux-4.19.y as commit b7b85ec5ec15 ("powerpc: +add crtsavres.o to always-y instead of extra-y") incorrect, breaking the +build with linkers that need crtsavres.o: + + ld.lld: error: cannot open arch/powerpc/lib/crtsavres.o: No such file or directory + +Backporting the aforementioned kbuild commit is not suitable for stable +due to its size and number of conflicts, so transform the always-y usage +to an equivalent form using always, which resolves the build issues. + +Fixes: b7b85ec5ec15 ("powerpc: add crtsavres.o to always-y instead of extra-y") +Signed-off-by: Nathan Chancellor +Signed-off-by: Greg Kroah-Hartman +--- + arch/powerpc/lib/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/powerpc/lib/Makefile ++++ b/arch/powerpc/lib/Makefile +@@ -21,8 +21,8 @@ obj-$(CONFIG_PPC32) += div64.o copy_32.o + # 64-bit linker creates .sfpr on demand for final link (vmlinux), + # so it is only needed for modules, and only for older linkers which + # do not support --save-restore-funcs +-ifeq ($(call ld-ifversion, -lt, 225000000, y),y) +-always-$(CONFIG_PPC64) += crtsavres.o ++ifeq ($(call ld-ifversion, -lt, 225000000, y)$(CONFIG_PPC64),yy) ++always += crtsavres.o + endif + + obj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \ diff --git a/queue-4.19/series b/queue-4.19/series index 12074fb3a12..82c68303998 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -15,3 +15,4 @@ rpmsg-virtio-free-driver_override-when-rpmsg_remove.patch parisc-firmware-fix-f-extend-for-pdc-addresses.patch nouveau-vmm-don-t-set-addr-on-the-fail-path-to-avoid-warning.patch block-remove-special-casing-of-compound-pages.patch +powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch -- 2.47.3