This patch is for 5.3.5, the final release of Lua 5.3. The source code includes all patches so they have been removed from the port.
Changes to the port Makefile include:
- Some cleanup of the variables
- Changed to use the bsd target in the Lua Makefile.
- Added new build options for Lua html documentation, editline/readline, and two Lua build in debugging options
- I have done some investigation and -pthead is required to use libressl with luaossl (as per comment) so I've left that and -lm in the port.
Update 2018-07-17: -pthread has been removed. As follows:
The inclusion of -pthread and it's fix has been described by jbeich as such:
-pthread was inherited from
which was probably fixed by
My only known use case for including -pthread was from section 1.2.3 of the luaossl manual
"Note that on some systems, such as NetBSD and FreeBSD, the loading application must be linked against pthreads (using lpthread or -pthread). It is not enough for the luaossl module to pull in the dependency at load time. In particular, if using the stock Lua interpreter, it must have been linked against pthreads at build time. Add the appropriate linker flag to MYLIBS in lua-5.2.x/src/Makefile."
The above issue seemingly fixed in my simple use cases evidenced in the Test Plan update on 2018-07-17.
I conclude that it is safe to remove -pthread with two testing scenarios outstanding. My reasons for this conclusion are two:
- It is not part of the standard Makefile and GNU/Linux distros don't seem to use it either (checked Debian and Arch. I have seen the emails online of -pthread being removed from the Fedora build).
- There is evidence that none of the prior known issues are still applicable
The two doubts I still hold are building luaossl against libressl and the potential that advanced use cases of luaossl may still be an issue (please see my Test Plan for further information). My opinion is these edge cases should not be used to force the inclusion of -pthread and those using luaossl against libressl can build their own version.