[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Makefile Patch
- From: Russell Haley <russ.haley@...>
- Date: Thu, 21 Jul 2016 11:13:34 -0600
Hello,
TLDR; http://pastebin.com/cUCtWb1w
I've been mucking around with lua 5.3 for a couple of months now and I
am attempting to create a FreeBSD/Debian cross platform app for
embedded (armv6) systems. It is my opinion that the FreeBSD lua53
ports script is outdated and contains a bunch of redundant items. I
can successfully build Lua from GitHub without any patches. However, I
have noted a few things:
1) The FreeBSD target does not include an -fPIC CFLAG. I have run into
a few libraries that require this, notably LuaXML. The FreeBSD port
script automagically adds -fPIC to all the supported platforms (armv6
was recommended but I don't think anyone has gotten to it as the port
is not maintained...yet!), so I would like to recommend that it is
included in the base Makefile (FreeBSD only).
2) The default compiler for Lua 5.3 is gcc. However, I have been able
to build and run everything I need using Clang (cc) in both 10.2, 10.3
and CURRENT-11. My libraries are still in their infancy but includes
things like luasys, luaxml, luvit and a lua lmdb wrapper. All these
run fine. While I would still want a public discussion on the FreeBSD
site, I think this is a pragmatic change for 2 reasons:
a) FreeBSD will no longer require any outside compiler or make system
(bmake works fine with the lua Makefile as it's fairly simple). That
means once the source is ascertained, a fresh FreeBSD installation
will build Lua.
b) This will be a good test for the entire Lua community if there are
others that wish to support clang on other platforms.
Because clang is supported in FreeBSD 10, this would leave only the
STABLE-9 and RELEASE-9.3 branches as having to fetch clang from the
FreeBSD binary package manager. Both STABLE-9 and RELEASE 9.3 will
fall out of support at the end of the year. As these are relatively
old releases and simply downloading the compiler or upgrading the
system to 10.0 would resolve the issue, I consider this concession to
be acceptable (I do not speak for FreeBSD, only myself). Please see
the FreeBSD release support page at
https://www.freebsd.org/security/security.html#sup for more
information.
The basic patch file is here: http://pastebin.com/cUCtWb1w. Please
note it's a git patch as that's all I have access to right now. As
it's a one liner, I hope I can be forgiven!
Thanks to everyone for being here. I'm just in love with Lua right now
and it's awesome to see such an active community.
Sincerely,
Russell Haley