From nobody Tue Jan 25 01:39:57 2022 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 8E508197235C; Tue, 25 Jan 2022 01:39:58 +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 4JjV0F5dLQz4ZWh; Tue, 25 Jan 2022 01:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074798; 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=MOR95IuO5Ilsms+OndkQBnTqrfkd2Sxu3FDD6+STWXo=; b=PdtftVZiMfoiNaegE+oGfeQjuAZ789Mq6U9GshGJs/bLs2j5K4syV0ViTZnVuY7CpGhjY4 E4U0cgd0dXYW5cqsBdgzjJWs86EYAn1cuvHMrqlUgvc36j6re67iq0iFqqmkuCVyBZe5Ku Yur5GThMak4o4EQPSJzG4RrmZT3CLnv0ZSyaUn+Y1wGSgNri+7jxN89n5sAmzQw8ELn1y/ +H3+089RrRMxxoYYcsYqyB5PRp6z96MLnuF9T/xksAoBoUC2x0BdllV/MSyOduESkU8pz1 yvm+5l98BZKQ3sZLoRI8RzITcQOlv6AAFUtTuAuFQJVbh7kWvw2sz823EbW4ew== 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 7091620C71; Tue, 25 Jan 2022 01:39:57 +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 20P1dvPe042882; Tue, 25 Jan 2022 01:39:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20P1dvHf042881; Tue, 25 Jan 2022 01:39:57 GMT (envelope-from git) Date: Tue, 25 Jan 2022 01:39:57 GMT Message-Id: <202201250139.20P1dvHf042881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: e3c550db8222 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: e3c550db8222276f4cf52640e5a07791c3db972e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074798; 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=MOR95IuO5Ilsms+OndkQBnTqrfkd2Sxu3FDD6+STWXo=; b=VVvjqS7XKlekDMkUwjrIgGgKdrMHSZZYCWHymW+NLtAvZkjK9lLk7J8QDVPY3dEJD5xje7 Za44WXcpMWxK5Ngk0xOFQjrwKF8OWMZHct3oTv+JFY8jfmkJuNlawThJIBw/vC8Du+Tx/8 xVQpP6eo8pvLl78XQItpMiYQ4VI7AaQbplLelbYGywYSRYs/X6+dMKBLBXQZpAsOUwr5zE sJjMXE9HpGv2gnjMzNkAp+w3IBbgyHgrEtYN9hxZWK1HFzLdQo0B/UADZtUBbrVbbq5hlf Uw72kZm+PAZCwgAIIW/iGMTKHj6sIrgUmrUzGB0pHrA9ALGWBANgRmFi2EQdGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643074798; a=rsa-sha256; cv=none; b=IC4bQJEohCnsbwJwsCLjDPuf6pXoTN+GV/+FNiJvJDDwoOiWWP7rKkH72Qhi3lcW6Sd3g8 xMQbc3fdFAflYHM/pJRmK4wNqhcjvl8+fx9gIHk0MH9DGKgpJaD0hV2Rt5uyObtIz/hcFr ULgRQ5mKZRbLE3EAn9ZBEVAdmpu9IEh/JVb3U7X0cmWny2dUpj+gwqNcTSSimVQMb1sgPC 31Pjv4ztP1p2xRNK0vnE8Jd2pZnhkYro3rpzDp+MGPbgrm0tzNk7KeC6ZgAkEPRUB2k6CC a1MG1rYoVVlLOcFTJ1BJ71lGrXTfCJf511CYKRB0YJcraUVeNiMMgmGiN03tdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=e3c550db8222276f4cf52640e5a07791c3db972e commit e3c550db8222276f4cf52640e5a07791c3db972e Author: Jessica Clarke AuthorDate: 2021-12-06 18:53:48 +0000 Commit: Jessica Clarke CommitDate: 2022-01-24 23:59:09 +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 (cherry picked from commit f0a6ab51e6da3e385856873b1c1c57a13f1c7eb3) --- 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 8fd7547630a3..98f50c22532b 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -456,8 +456,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}}