From nobody Mon Dec 06 19:17:04 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B990818C0DCB; Mon, 6 Dec 2021 19:17:06 +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 4J7Cq527Lmz4fmN; Mon, 6 Dec 2021 19:17:05 +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 813A911C8A; Mon, 6 Dec 2021 19:17:04 +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 1B6JH4FV007544; Mon, 6 Dec 2021 19:17:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6JH4tG007543; Mon, 6 Dec 2021 19:17:04 GMT (envelope-from git) Date: Mon, 6 Dec 2021 19:17:04 GMT Message-Id: <202112061917.1B6JH4tG007543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: f0a6ab51e6da - main - src.libnames.mk: Include dependencies when bootstrapping from non-FreeBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0a6ab51e6da3e385856873b1c1c57a13f1c7eb3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638818225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZIIYwIMoyA3xWogcUZjmBECygZNExS4ymXJ5bibplZ8=; b=LSctFChgp9VNFyADJgs5NmhDzba9Q0d5M3TEd2lAMSSOs7xMAlAb5AdfOyNDkqaeeekIJ6 MvF24R5evvLz8GFeh0lIzacFQ1sicNTW5sfKux1kg64f5eT8Tz651fIpzXG/K8Q5aGSx+e MMjp20v55RhSgqklXqs/vWuyEY/QkFuRWPS7/3z+fuWqs3gVsLnmImK+Xuo0AEPSUhFYAq 95NHhjPLe4gCCkQv2g7e5RoA3frJAb79zeQ9ghYgP54QaZh4ak6RAq44i/C4Sh1mjBAHpv lNt5ON/b66oum5u8JCi9wVMWJthseBlZ3heKFLnC80LnopumyErgC/qLVqp5Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638818225; a=rsa-sha256; cv=none; b=mq4FPVT224WHwUaQZCioBscUE2GRs7/OqvF33HTm2805WZlGZ/8xeOBxmD2FzWLv7AletR 0XqARa+Zp8TG78pTbgCbHuA2n1UfrkYBZVqHBYLHPBPHKWEmidfCEawYh8fNL+X3kTR8ZK qD968dYOi2qVoC5g0NFRpzp5h0jDuSSn8YJCw2EqGOmpIhQVwwhqYo+5nAl5wttItdaeON R6xCVKGU3a6zm0Anf66yQnKeO2gdoSPM9nrLb8iI89RPQ0Lnk0EifiKQLwcVo4uiMU6UZx 4IRrs3V5tyqE63X1e4n4qayLnzxP4MB6i5vpD13Xnr1RuixlGWR3lO4Z5ooLjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a6ab51e6da3e385856873b1c1c57a13f1c7eb3 commit f0a6ab51e6da3e385856873b1c1c57a13f1c7eb3 Author: Jessica Clarke AuthorDate: 2021-12-06 18:53:48 +0000 Commit: Jessica Clarke CommitDate: 2021-12-06 19:16:27 +0000 src.libnames.mk: Include dependencies when bootstrapping from non-FreeBSD When bootstrapping on FreeBSD we use -DNO_SHARED so this case is already handled correctly, but on non-FreeBSD we set NO_SHARED to no in Makefile.boot.pre as not all OSes have static libraries available. As a result, users of libdwarf fail to link during the cross tools stage due to the newly-introduced dependency of libdwarf on libz. This should perhaps be reworked to instead leave NO_SHARED as yes but have an override (either implicit in bsd.prog.mk, or explicit via a new variable) to turn off just the use of -static. MFC after: 1 week --- share/mk/src.libnames.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 4339b4f5bb50..bcaf07c88e9c 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -462,8 +462,12 @@ LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l:S/${PIE_SUFFIX}//}${PIE_SUFFIX} LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} .endif # Add in all dependencies for static linkage. +# Bootstrapping from non-FreeBSD needs special handling, since it overrides +# NO_SHARED back to yes despite only building static versions of bootstrap +# libraries (see tools/build/mk/Makefile.boot.pre). .if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \ - (defined(NO_SHARED) && ${NO_SHARED:tl} != "no")) + (defined(NO_SHARED) && ${NO_SHARED:tl} != "no") || \ + (defined(BOOTSTRAPPING) && ${.MAKE.OS} != "FreeBSD")) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} LDADD_${_l}+= ${LDADD_${_d}}