grumpycoders / pcsx-redux

The PCSX-Redux project is a collection of tools, research, hardware design, and libraries aiming at development and reverse engineering on the PlayStation 1. The core product itself, PCSX-Redux, is yet another fork of the Playstation emulator, PCSX.
https://pcsx-redux.consoledev.net
GNU General Public License v2.0
637 stars 96 forks source link

Fix LuaJIT build when LDFLAGS is defined #1667

Closed njfox closed 3 months ago

njfox commented 3 months ago

The LuaJIT dependency was failing to compile when LDFLAGS was defined in the command line. This was uncovered in the AUR package when changes to makepkg flags caused LDFLAGS to be set when building the package without explicitly disabling buildoptions.

My understanding is that when LDFLAGS is set, the incorrect options (pkgconfig --libraries ...) were being picked up by the LuaJIT Makefile. This PR defines a separate LUAJIT_LDFLAGS variable, initialized to LDFLAGS, but without the additional options added by the pcsx-redux build, which allows any host options (like the security flags set by Arch's makepkg) to still be passed to LuaJIT without breaking it.

Please let me know if you have any feedback.

Thanks!