Author: dim
Date: Sat Apr 25 18:23:23 2020
New Revision: 360320
URL: https://svnweb.freebsd.org/changeset/base/360320

Log:
  MFC r359045 (by brooks):
  
  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

Added:
  stable/12/lib/liblua/
     - copied from r359045, head/lib/liblua/
Deleted:
  stable/12/libexec/flua/luaconf.h
Modified:
  stable/12/lib/Makefile
  stable/12/libexec/flua/Makefile
  stable/12/share/mk/src.libnames.mk
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/Makefile
==============================================================================
--- stable/12/lib/Makefile      Sat Apr 25 15:52:54 2020        (r360319)
+++ stable/12/lib/Makefile      Sat Apr 25 18:23:23 2020        (r360320)
@@ -59,6 +59,7 @@ SUBDIR=       ${SUBDIR_BOOTSTRAP} \
        libjail \
        libkiconv \
        libkvm \
+       liblua \
        liblzma \
        libmemstat \
        libmd \

Modified: stable/12/libexec/flua/Makefile
==============================================================================
--- stable/12/libexec/flua/Makefile     Sat Apr 25 15:52:54 2020        
(r360319)
+++ stable/12/libexec/flua/Makefile     Sat Apr 25 18:23:23 2020        
(r360320)
@@ -11,19 +11,8 @@ MAN= # No manpage; this is internal.
 
 CWARNFLAGS.gcc+=       -Wno-format-nonliteral
 
-LIBADD=        m
+LIBADD=        lua
 
-# Core functions
-SRCS=  lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c \
-       lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c \
-       ltm.c lundump.c lvm.c lzio.c
-
-# Library functions; any change to these likely needs an accompanying change
-# in our custom linit_flua.c.  We use our custom linit.c to make it easier to
-# support bootstrap flua that may not have supporting local libraries.
-SRCS+= lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c \
-       lmathlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c loadlib.c
-
 # Entry point
 SRCS+= lua.c
 
@@ -32,7 +21,7 @@ SRCS+=        lua.c
 SRCS+= linit_flua.c
 SRCS+= lfs.c lposix.c
 
-CFLAGS+=       -I${.CURDIR} -I${.CURDIR}/modules -I${LUASRC}
+CFLAGS+=       -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC}
 CFLAGS+=       -DLUA_PROGNAME="\"${PROG}\""
 
 # readline bits; these aren't needed if we're building a bootstrap flua, as we

Modified: stable/12/share/mk/src.libnames.mk
==============================================================================
--- stable/12/share/mk/src.libnames.mk  Sat Apr 25 15:52:54 2020        
(r360319)
+++ stable/12/share/mk/src.libnames.mk  Sat Apr 25 18:23:23 2020        
(r360320)
@@ -41,6 +41,7 @@ _INTERNALLIBS=        \
                fifolog \
                ipf \
                lpr \
+               lua \
                netbsd \
                ntp \
                ntpevent \
@@ -293,6 +294,7 @@ _DP_memstat=        kvm
 _DP_magic=     z
 _DP_mt=                sbuf bsdxml
 _DP_ldns=      ssl crypto
+_DP_lua=       m
 .if ${MK_OPENSSL} != "no"
 _DP_fetch=     ssl crypto
 .else
@@ -464,6 +466,9 @@ LDADD+=             ${LDADD_${_l}}
 # INTERNALLIB definitions.
 LIBELFTCDIR=   ${OBJTOP}/lib/libelftc
 LIBELFTC?=     ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a
+
+LIBLUADIR=     ${OBJTOP}/lib/liblua
+LIBLUA?=       ${LIBLUADIR}/liblua${PIE_SUFFIX}.a
 
 LIBPEDIR=      ${OBJTOP}/lib/libpe
 LIBPE?=                ${LIBPEDIR}/libpe${PIE_SUFFIX}.a
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to