Skip to content

Commit

Permalink
Merge pull request #691 from nathanchance/fix-powerpc-5.4
Browse files Browse the repository at this point in the history
Add a patch to fix the PowerPC build on 5.4
  • Loading branch information
nathanchance authored Jan 26, 2024
2 parents 862e4e6 + 6650699 commit dd7230d
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/5.4-clang-13.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-13.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-13.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json tuxsuite/5.4-clang-13.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-13.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/5.4-clang-14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-14.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-14.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json tuxsuite/5.4-clang-14.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-14.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/5.4-clang-15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-15.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-15.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json tuxsuite/5.4-clang-15.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-15.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/5.4-clang-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-16.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-16.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json tuxsuite/5.4-clang-16.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-16.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/5.4-clang-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-17.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-17.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json tuxsuite/5.4-clang-17.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-17.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/5.4-clang-19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-19.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-19.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down Expand Up @@ -378,7 +378,7 @@ jobs:
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
- name: tuxsuite
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json tuxsuite/5.4-clang-19.tux.yml || true
run: tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name allconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-19.tux.yml || true
- name: Update Cache Build Status
if: ${{ needs.check_cache.outputs.output == 'failure' || github.event_name == 'workflow_dispatch' }}
run: python update_cache.py
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
From git@z Thu Jan 1 00:00:00 1970
Subject: [PATCH] powerpc: Use always instead of always-y in for crtsavres.o
From: Nathan Chancellor <[email protected]>
Date: Fri, 26 Jan 2024 10:37:02 -0700
Message-Id: <20240126-5-4-fix-lib-powerpc-backport-v1-1-2c110ed18b1d@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

This commit is for linux-5.4.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-5.4.y as commit 245da9eebba0 ("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: 245da9eebba0 ("powerpc: add crtsavres.o to always-y instead of extra-y")
Link: https://lore.kernel.org/r/20240126-5-4-fix-lib-powerpc-backport-v1-1-2c110ed18b1d@kernel.org
Signed-off-by: Nathan Chancellor <[email protected]>
---
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 7c603839fe28..841e6ed30f13 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -34,8 +34,8 @@ obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.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: f0602893f43a54097fcf22bd8c2f7b8e75ca643e
change-id: 20240126-5-4-fix-lib-powerpc-backport-9d577643dcfc

Best regards,
--
Nathan Chancellor <[email protected]>

1 change: 1 addition & 0 deletions patches/5.4/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20240126_nathan_powerpc_use_always_instead_of_always_y_in_for_crtsavres_o.patch
3 changes: 2 additions & 1 deletion tuxsuite/5.4-clang-13.tux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# This file has been autogenerated by invoking:
# $ ./generate_tuxsuite.py 5.4
# Invoke tuxsuite via:
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-13.tux.yml
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-13.tux.yml
# Invoke locally via:
# $ git clone -b linux-5.4.y --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
# $ git -C linux quiltimport --patches ../patches/5.4
# $ scripts/build-local.py -C linux -f tuxsuite/5.4-clang-13.tux.yml -j defconfigs
version: 1
name: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git at linux-5.4.y
Expand Down
3 changes: 2 additions & 1 deletion tuxsuite/5.4-clang-14.tux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# This file has been autogenerated by invoking:
# $ ./generate_tuxsuite.py 5.4
# Invoke tuxsuite via:
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-14.tux.yml
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-14.tux.yml
# Invoke locally via:
# $ git clone -b linux-5.4.y --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
# $ git -C linux quiltimport --patches ../patches/5.4
# $ scripts/build-local.py -C linux -f tuxsuite/5.4-clang-14.tux.yml -j defconfigs
version: 1
name: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git at linux-5.4.y
Expand Down
3 changes: 2 additions & 1 deletion tuxsuite/5.4-clang-15.tux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# This file has been autogenerated by invoking:
# $ ./generate_tuxsuite.py 5.4
# Invoke tuxsuite via:
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-15.tux.yml
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-15.tux.yml
# Invoke locally via:
# $ git clone -b linux-5.4.y --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
# $ git -C linux quiltimport --patches ../patches/5.4
# $ scripts/build-local.py -C linux -f tuxsuite/5.4-clang-15.tux.yml -j defconfigs
version: 1
name: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git at linux-5.4.y
Expand Down
3 changes: 2 additions & 1 deletion tuxsuite/5.4-clang-16.tux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# This file has been autogenerated by invoking:
# $ ./generate_tuxsuite.py 5.4
# Invoke tuxsuite via:
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-16.tux.yml
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-16.tux.yml
# Invoke locally via:
# $ git clone -b linux-5.4.y --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
# $ git -C linux quiltimport --patches ../patches/5.4
# $ scripts/build-local.py -C linux -f tuxsuite/5.4-clang-16.tux.yml -j defconfigs
version: 1
name: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git at linux-5.4.y
Expand Down
3 changes: 2 additions & 1 deletion tuxsuite/5.4-clang-17.tux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# This file has been autogenerated by invoking:
# $ ./generate_tuxsuite.py 5.4
# Invoke tuxsuite via:
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-17.tux.yml
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-17.tux.yml
# Invoke locally via:
# $ git clone -b linux-5.4.y --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
# $ git -C linux quiltimport --patches ../patches/5.4
# $ scripts/build-local.py -C linux -f tuxsuite/5.4-clang-17.tux.yml -j defconfigs
version: 1
name: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git at linux-5.4.y
Expand Down
3 changes: 2 additions & 1 deletion tuxsuite/5.4-clang-19.tux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# This file has been autogenerated by invoking:
# $ ./generate_tuxsuite.py 5.4
# Invoke tuxsuite via:
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json tuxsuite/5.4-clang-19.tux.yml
# $ tuxsuite plan --git-repo https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --git-ref linux-5.4.y --job-name defconfigs --json-out builds.json --patch-series patches/5.4 tuxsuite/5.4-clang-19.tux.yml
# Invoke locally via:
# $ git clone -b linux-5.4.y --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux
# $ git -C linux quiltimport --patches ../patches/5.4
# $ scripts/build-local.py -C linux -f tuxsuite/5.4-clang-19.tux.yml -j defconfigs
version: 1
name: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git at linux-5.4.y
Expand Down

0 comments on commit dd7230d

Please sign in to comment.