From owner-dev-commits-src-all@freebsd.org Sun Jan 24 03:43:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5EF954E9EA3; Sun, 24 Jan 2021 03:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DNf481v6jz3tcR; Sun, 24 Jan 2021 03:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31A4F1D0A1; Sun, 24 Jan 2021 03:43:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 10O3hqlx067652; Sun, 24 Jan 2021 03:43:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 10O3hqaM067651; Sun, 24 Jan 2021 03:43:52 GMT (envelope-from git) Date: Sun, 24 Jan 2021 03:43:52 GMT Message-Id: <202101240343.10O3hqaM067651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: bd98a274d0ed - stable/12 - flua: don't allow dlopen, et al., for bootstrap flua MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bd98a274d0edbf596c40435335a37282adaebdb0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2021 03:43:52 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bd98a274d0edbf596c40435335a37282adaebdb0 commit bd98a274d0edbf596c40435335a37282adaebdb0 Author: Kyle Evans AuthorDate: 2020-08-14 02:22:19 +0000 Commit: Kyle Evans CommitDate: 2021-01-24 03:43:26 +0000 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. 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. (cherry picked from commit c2a2b4f3cf11e770892a524df637f671f5989719) (cherry picked from commit 967fbfd9e2b7a015d5cba1491badcdf9044b28b9) --- lib/liblua/Makefile | 2 ++ lib/liblua/luaconf.h | 2 ++ libexec/flua/Makefile | 3 +-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/liblua/Makefile b/lib/liblua/Makefile index 28fc05a9aa71..e5f5e3c5960a 100644 --- a/lib/liblua/Makefile +++ b/lib/liblua/Makefile @@ -29,6 +29,8 @@ CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" .if defined(BOOTSTRAPPING) CFLAGS+= -DLUA_PATH_DEFAULT="\"/nonexistent/?.lua\"" CFLAGS+= -DLUA_CPATH_DEFAULT="\"/nonexistent/?.so\"" +# We don't support dynamic libs on bootstrap builds. +CFLAGS+= -DBOOTSTRAPPING .endif .include 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 373f93cbf176..0cd8ca924495 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -30,8 +30,7 @@ CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" CFLAGS+= -DLUA_USE_READLINE CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit LIBADD+= edit -.endif - LDFLAGS+= -Wl,-E +.endif .include