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

3ds: add luajit #135

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

3ds: add luajit #135

wants to merge 3 commits into from

Conversation

TSnake41
Copy link

@TSnake41 TSnake41 commented Apr 14, 2020

This is a cleaned up version of #85 that got too complicated.

I also added few notable changes from original pull-request :

  • there is no longer need of libdl (that required a slight source code hack while building) so I added a luajit.pc patch to remove the link to libdl (see luajit.pc.patch), LuaJIT will use default "console" behavior and throw and error when attempting to use ffi.load and few other functions (which is the expected behavior).
    • this will prevent potential breaking if some change in the source code affect this hack
    • as it is recognized as a "console" platform, libdl is not used

notes :
JIT is working with various optimization (ARMv6, VFPv2, and standard JIT optimizations) but assumes that XN-bit is not set on malloc-ed memory (this has to be verified).

In case of issues with JIT we can still set -DLUAJIT_DISABLE_JIT to disable JIT and still have FFI plus a significant performance boost compared to original Lua 5.1. Note that this setting is required for a LuaJIT Switch port.

Used in LovePotion LuaJIT port

@WinterMute
Copy link
Member

Would be simpler to just sed the .pc file in place like we've done in some of the other PKGBUILDS. See https://github.com/devkitPro/pacman-packages/blob/master/3ds/SDL_mixer/PKGBUILD#L33 for instance. Saves adding a patch file & another checksum for such a small change.

The -Wl,-E should also be removed.

@TSnake41
Copy link
Author

I am not a master of sed, but still made something working.

@TSnake41 TSnake41 closed this Apr 14, 2020
@TSnake41 TSnake41 reopened this Apr 14, 2020
@uyjulian
Copy link
Contributor

echo -n (string) is non-POSIX. I would recommend you use printf '%s' (string) instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants