aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/liblua/luaconf.h2
-rw-r--r--libexec/flua/Makefile6
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/liblua/luaconf.h b/lib/liblua/luaconf.h
index 6226e8ab1e84..bc7f5bb6e141 100644
--- a/lib/liblua/luaconf.h
+++ b/lib/liblua/luaconf.h
@@ -75,8 +75,10 @@
/* Local modifications: need io.popen */
#ifdef __FreeBSD__
#define LUA_USE_POSIX
+#ifndef BOOTSTRAPPING
#define LUA_USE_DLOPEN
#endif
+#endif
/*
@@ LUA_C89_NUMBERS ensures that Lua uses the largest types available for
diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile
index 3efb75044b09..c852bd4fe499 100644
--- a/libexec/flua/Makefile
+++ b/libexec/flua/Makefile
@@ -30,6 +30,10 @@ CFLAGS+= -DLUA_PROGNAME="\"${PROG}\""
CFLAGS+= -DLUA_USE_READLINE
CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit
LIBADD+= edit
+LDFLAGS+= -Wl,-E
+.else
+# We don't support dynamic libs on bootstrap builds.
+CFLAGS+= -DBOOTSTRAPPING
.endif
UCLSRC?= ${SRCTOP}/contrib/libucl
@@ -38,6 +42,4 @@ SRCS+= lua_ucl.c
CFLAGS+= -I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash
LIBADD+= ucl
-LDFLAGS+= -Wl,-E
-
.include <bsd.prog.mk>