-
Notifications
You must be signed in to change notification settings - Fork 34
Use system build variables when building liblua52.so #517
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
Conversation
|
Hello and welcome to Yafc! Thank you for the contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deliberately left them out as I wanted to make this 'fool proof' and assume that someone requiring debug symbols would know how to modify the script and add the according variables en enable them.
As an middle ground, we could add some message (echo) telling anyone running the script, that adding custom build flags needs to be done in the script directly.
I am fine by this change, as it is not wrong, but would like the final decision by @shpaass: whether we keep it 'fool proof' or allow for easy tinkering (one could argue that only people who are tinkering will use it, so we need to facilitate them with this PR... 🤔 ).
|
What do you guys think about using the flags but thoroughly explaining what they do in the comment above the line that the PR changes? A person may have no idea what CFLAGS and LDFLAGS are, so let's describe their purpose and contents a bit. |
|
If someone knows how to set But since you mentioned documentation: It might be nice(r) to add a sentence that these are supported by the script in the README.md in the Lua folder. So other devs know they can be used. I think that is a more obvious place than inside the script? |
|
Rebased on fresh master |
|
Squashed fixups |
|
Added a changelog note that mentions the rebuild of the linux lib because it was not mentioned in #515. |
Related to #515, liblua52.so can be built using the system CFLAGS variable. I noticed when building/modifying the AUR package that running the build script only included
-fPIC, and built using only-O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -fPIC. This didn't compile using the debug options set by makepkg.Adding
${CFLAGS}to MYCFLAGS in the build script allowed the library to compile with those symbols, as well as other security mitigations. SYSCFLAGS is set explicitly in Lua's Makefile, so it's safer to change MYCFLAGS and MYLDFLAGS instead without patching.