]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r354245, r354833, r354837: add flua to the base system
authorKyle Evans <kevans@FreeBSD.org>
Tue, 3 Dec 2019 18:25:16 +0000 (18:25 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 3 Dec 2019 18:25:16 +0000 (18:25 +0000)
commit7825c2df5bf93ddc6d0aeb82825604b1a9cd59f2
tree060bd8800654173c30de67ecbc07510d055b7ae6
parentd01e667bab737b40f855d0ef7ce01f3fbc8426ae
MFC r354245, r354833, r354837: add flua to the base system

r354245: stand: consolidate knowledge of lua path

Multiple places coordinate to 'know' where lua scripts are installed. Knock
this down to being formally defined (and overridable) in exactly one spot,
defs.mk, and spread the knowledge to loaders and liblua alike. A future
commit will expose this to lua as loader.lua_path, so it can build absolute
paths to lua scripts as needed.

r354833: Add flua to the base system, install to /usr/libexec

FreeBSDlua ("flua") is a FreeBSD-private lua, flavored with whatever
extensions we need for base system operations. We currently support a subset
of lfs and lposix that are used in the rewrite of makesyscall.sh into lua,
added in r354786.

flua is intentionally written such that one can install standard lua and
some set of lua modules from ports and achieve the same effect.

linit_flua is a copy of linit.c from contrib/lua with lfs and lposix added
in. This is similar to what we do in stand/. linit.c has been renamed to
make it clear that this has flua-specific bits.

luaconf has been slightly obfuscated to make extensions more difficult. Part
of the problem is that flua is already hard enough to use as a bootstrap
tool because it's not in PATH- attempting to do extension loading would
require a special bootstrap version of flua with paths changed to protect
the innocent.

src.lua.mk has been added to make it easy for in-tree stuff to find flua,
whether it's bootstrap-flua or relying on PATH frobbing by Makefile.inc1.

r354837: flua: newer GCC complains about format-nonliteral at WARNS=2

Disable that one, too.
15 files changed:
libexec/Makefile
libexec/flua/Makefile [new file with mode: 0644]
libexec/flua/linit_flua.c [new file with mode: 0644]
libexec/flua/luaconf.h [new file with mode: 0644]
libexec/flua/modules/lfs.c [moved from stand/liblua/lfs.c with 84% similarity]
libexec/flua/modules/lfs.h [moved from stand/liblua/lfs.h with 100% similarity]
libexec/flua/modules/lposix.c [new file with mode: 0644]
libexec/flua/modules/lposix.h [new file with mode: 0644]
share/mk/src.lua.mk [new file with mode: 0644]
stand/common/interp_lua.c
stand/defs.mk
stand/liblua/Makefile
stand/liblua/luaconf.h
stand/loader.mk
stand/lua/Makefile