Commit Graph

10 Commits

Author SHA1 Message Date
Warner Losh
8c784bb8cf lua: Update to 5.4.4
Merge commit '755d9301ca89f02956fd17858b9d4d821ab5c972' from the
vendor branch. This updates us from lua 5.4.2 to 5.4.4.

In addition, it switches around how we flavor liblua for the boot loader
and flua. This is done to reduce diffs with upstream and make it easier
to import new versions (the current method has too many conflicts to
resolve by hand): we include luaconf.local.h from luaconf.h (the only
change to this file is now that #include at the end). We then define
what we need to: for flua (which does very little) and one for stand
(which creates the new FLOAT type out of int64).

Sponsored by:		Netflix
2023-02-08 10:33:26 -07:00
Ed Maste
ec96506307 lua: reduce diffs between luaconf.h copies
Upstream luaconf.h is contrib/lua/src/luaconf.h.dist, while userland lua
and loader lua have copies in lib/liblua/luaconf.h and
stand/liblua/luaconf.h.

Adjust whitespace, VCS tags, etc. to match upstream's version, for ease
of comparison.

Reviewed By:	imp
Sponsored By:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38206
2023-01-26 12:38:19 -05:00
Kyle Evans
0495ed398c contrib/lua: update to 5.4.2
Merge commit '0ea45b9cd43ce1247eb3eee9bfd5cee3d19068e7' into main
2021-01-13 23:56:18 -06:00
Alex Richardson
0c54932d50 Fix -Wundef warnings when building liblua
We need to define the LUA_FLOAT_INT64 macro even if we don't use it (copied
from stand/luaconf.h). While touching luaconf.h.dist also sync it with the
the 5.3.5 release version (matches the one in lib/liblua).

Reviewed By:	kevans
Differential Revision: https://reviews.freebsd.org/D25977
2020-08-25 13:30:34 +00:00
Kyle Evans
967fbfd9e2 Properly disable LUA_USE_DLOPEN for bootstrap flua
flua does have some specific bits that will include luaconf.h, but the
definition of LUA_USE_DLOPEN for those won't matter. This belongs in liblua
instead.

To expand on my previous commit, which was a little sparse with details,
it's not really safe to allow LUA_USE_DLOPEN with host lib paths being used.
The host system could have an entirely different lua version and this could
cause us to crash and burn.

If we want to revive this later, we need to make sure to define c module
paths inside OBJDIR that are compiled against whatever version we've
bootstrapped.

Pointy hat:	kevans
2020-08-14 02:40:17 +00:00
Kyle Evans
c2a2b4f3cf flua: don't allow dlopen, et al., for bootstrap flua
There are some logistics issues that need to be sorted out here before we
can actually allow this to work.
2020-08-14 02:22:19 +00:00
Ed Maste
3bd8419597 flua: support "require" for binary objects in the base system
Export symbols from flua, and enable dlopen.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26059
2020-08-13 23:13:05 +00:00
Ed Maste
bceabe277e flua: initial support for "require" in the base system
Use /usr not /usr/local for base system components.

Use /usr/lib/flua and /usr/share/flua (not lua) for consistency and to
avoid the possibility that other software accidentally finds our base
system modules.

Also drop the version from the path, as flua represents an unspecified
lua version that corresponds to the FreeBSD version it comes with.

LUA_USE_DLOPEN is not yet enabled because some additional changes are
needed wrt symbol visibility.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24605
2020-08-13 00:19:05 +00:00
Ed Maste
be99f8868b liblua: ensure that "require" will fail in bootstrap flua
We do not want to support bootstrapping lua modules, so ensure that
require will fail by providing a nonexistent path.

Reviewed by:	kevans
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D24610
2020-04-29 13:41:32 +00:00
Brooks Davis
564b9ff2a7 Add an internal liblua and use it in flua.
The new liblua will be used in a forthcoming import of kyua.

Reviewed by:	kevans
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24090
2020-03-17 17:28:12 +00:00