Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luajit: fix build on powerpc #25740

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lang/luajit/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ compiler.thread_local_storage yes
# https://trac.macports.org/ticket/45343
compiler.blacklist {clang < 700} macports-clang-3.3 macports-clang-3.4

platform powerpc {
depends_lib-append \
port:libunwind
}

## Fix universal builds, see:
# - https://www.freelists.org/post/luajit/Building-universal-libraries-x86-64-and-arm64-for-osx,4
# - https://git.openembedded.org/meta-openembedded/plain/meta-oe/recipes-devtools/luajit/luajit_git.bb
Expand Down
12 changes: 12 additions & 0 deletions lang/luajit/files/powerpc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ https://www.freelists.org/post/luajit/LuaJIT-on-OS-X-Leopard-PowerPC,1
/* Keep @plt etc. */
#else
*p = '\0';

On powerpc same linking error as in https://github.com/ziglang/zig/issues/14089
--- src/Makefile 2024-07-04 07:26:29.000000000 +0800
+++ src/Makefile 2024-09-14 05:49:30.000000000 +0800
@@ -256,6 +256,7 @@
TARGET_ARCH= -DLJ_ARCH_ENDIAN=LUAJIT_BE
endif
TARGET_LJARCH= ppc
+ TARGET_XLIBS+= -lunwind
else
ifneq (,$(findstring LJ_TARGET_MIPS ,$(TARGET_TESTARCH)))
ifneq (,$(findstring MIPSEL ,$(TARGET_TESTARCH)))