linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.19] powerpc: Use always instead of always-y in for crtsavres.o
@ 2024-01-26 17:36 Nathan Chancellor
  2024-01-27  0:52 ` Greg KH
  2024-01-27  0:56 ` Patch "powerpc: Use always instead of always-y in for crtsavres.o" has been added to the 4.19-stable tree gregkh
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Chancellor @ 2024-01-26 17:36 UTC (permalink / raw)
  To: gregkh, sashal
  Cc: Nathan Chancellor, llvm, linuxppc-dev, stable, linux-kbuild

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 <nathan@kernel.org>
---
 arch/powerpc/lib/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 6f1e57182876..f0aa6fc8c6b2 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -21,8 +21,8 @@ obj-$(CONFIG_PPC32)	+= div64.o copy_32.o crtsavres.o strlen_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 \

---
base-commit: b060cfd3f707ad3c8ae8322e1b149ba7e2cf33e0
change-id: 20240126-4-19-fix-lib-powerpc-backport-6f4a823adf1a

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.19] powerpc: Use always instead of always-y in for crtsavres.o
  2024-01-26 17:36 [PATCH 4.19] powerpc: Use always instead of always-y in for crtsavres.o Nathan Chancellor
@ 2024-01-27  0:52 ` Greg KH
  2024-01-27  0:56 ` Patch "powerpc: Use always instead of always-y in for crtsavres.o" has been added to the 4.19-stable tree gregkh
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2024-01-27  0:52 UTC (permalink / raw)
  To: Nathan Chancellor; +Cc: sashal, llvm, linuxppc-dev, stable, linux-kbuild

On Fri, Jan 26, 2024 at 10:36:31AM -0700, Nathan Chancellor wrote:
> 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 <nathan@kernel.org>
> ---

Both now queued up, thanks!

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Patch "powerpc: Use always instead of always-y in for crtsavres.o" has been added to the 4.19-stable tree
  2024-01-26 17:36 [PATCH 4.19] powerpc: Use always instead of always-y in for crtsavres.o Nathan Chancellor
  2024-01-27  0:52 ` Greg KH
@ 2024-01-27  0:56 ` gregkh
  1 sibling, 0 replies; 3+ messages in thread
From: gregkh @ 2024-01-27  0:56 UTC (permalink / raw)
  To: gregkh, linuxppc-dev, llvm, nathan, sashal; +Cc: stable-commits


This is a note to let you know that I've just added the patch titled

    powerpc: Use always instead of always-y in for crtsavres.o

to the 4.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch
and it can be found in the queue-4.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From nathan@kernel.org  Fri Jan 26 16:52:20 2024
From: Nathan Chancellor <nathan@kernel.org>
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 <nathan@kernel.org>
Message-ID: <20240126-4-19-fix-lib-powerpc-backport-v1-1-f0de224db66b@kernel.org>

From: Nathan Chancellor <nathan@kernel.org>

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 <nathan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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 \


Patches currently in stable-queue which might be from nathan@kernel.org are

queue-4.19/powerpc-use-always-instead-of-always-y-in-for-crtsavres.o.patch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-27  0:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26 17:36 [PATCH 4.19] powerpc: Use always instead of always-y in for crtsavres.o Nathan Chancellor
2024-01-27  0:52 ` Greg KH
2024-01-27  0:56 ` Patch "powerpc: Use always instead of always-y in for crtsavres.o" has been added to the 4.19-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).