From nobody Mon Dec 6 19:17:06 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 640B318C0DE4; Mon, 6 Dec 2021 19:17:08 +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 4J7Cq73yN2z4fST; Mon, 6 Dec 2021 19:17:07 +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 C46D211B59; Mon, 6 Dec 2021 19:17:06 +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 1B6JH6NW007599; Mon, 6 Dec 2021 19:17:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B6JH6Q6007598; Mon, 6 Dec 2021 19:17:06 GMT (envelope-from git) Date: Mon, 6 Dec 2021 19:17:06 GMT Message-Id: <202112061917.1B6JH6Q6007598@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: 8d5d329553b3 - main - Bootstrap libz when cross-building 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: 8d5d329553b345c0887405db741750b0f728d902 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638818227; 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=rBSZ4xtbGpRFoohmtt5mmiUz0nnI4lO7y3+mEl1VNR8=; b=lUEryZf2iC+zRFQy7ww7buLMU+WpympQUcMszP6eNqy+m9EYqhZgQ2LFyZZgJIsrDtJqC9 +/FcjbmHq32z6EtEUtSrg7bRVeNU4vobJ7xMTPc3VTe1iX/BpkOnpMdnSmJioFbQS6RgoT b2466qANNoq2Or2PHZocrLukJ5q3nwfiqjNPJWWw7VV7hZOPNW3uHlPwNbymEdKoqVGaeb jIj+68u6OA4z9Wi9a/p3udEyP5qPmXbs7M7LURgDPuwdlpZeTrTkV4vxlI0CYaqioR9T8U Up0sM0/0nRvjkClsE0YcqM58cg9myx1Cs23EGi7MARVLfGZ1PQh2dy0ytXkLOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638818227; a=rsa-sha256; cv=none; b=AMfhbVmiSeN3gO8NSDzjw5j1hbiqNvfK7T9kS5DtJyHuidZ7JqbRkTsMtQZ86lgeJbGOBf XJHgJcKeer0KSZC4E8yUBgt63fwRif/tbQHtk+lipXoXkfrIGM5u8f7E/ROUbtDA+W5jPD uNoOeDj+WjE0ytAez3OE5bc5/zxy/twJN3urApXaguHVpNQtB0TK9KhRNTB6HtgRKXHWEz 4+RvyhhthyxReRWNg9WOqKLmDEG1mcjy5VNAaOGeiYUoxjwgBlz4xSKZcS6TDt03bTIuZF HRezZZRK/5BBFZYLBjnZq694kOHM7QPbmVBNmLMu9YMwFETJnUIvGwBJHh7TOQ== 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=8d5d329553b345c0887405db741750b0f728d902 commit 8d5d329553b345c0887405db741750b0f728d902 Author: Jessica Clarke AuthorDate: 2021-12-06 18:12:46 +0000 Commit: Jessica Clarke CommitDate: 2021-12-06 19:16:28 +0000 Bootstrap libz when cross-building from non-FreeBSD This is needed now libdwarf depends on libz. Fixes: dbf05458e3bd ("libdwarf: Support consumption of compressed ELF sections") MFC after: 1 week --- Makefile.inc1 | 4 ++++ lib/libz/Makefile | 7 ++++++- tools/build/mk/Makefile.boot | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 828de1bbbd84..2f425a6552e9 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2469,6 +2469,10 @@ _other_bootstrap_tools+=usr.bin/bmake # Avoid dependency on host bz2 headers: _other_bootstrap_tools+=lib/libbz2 ${_bt}-usr.bin/grep: ${_bt}-lib/libbz2 + +# libdwarf depends on libz +_other_bootstrap_tools+=lib/libz +${_bt}-lib/libdwarf: ${_bt}-lib/libz .else # All tools in _basic_bootstrap_tools have the same name as the subdirectory # so we can use :T to get the name of the symlinks that we need to create. diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 4ece3e3e059f..a954fee95118 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -38,9 +38,14 @@ SRCS+= inflate.c SRCS+= inftrees.c SRCS+= trees.c SRCS+= uncompr.c -SRCS+= zopen.c SRCS+= zutil.c +# Wrapper relies on FreeBSD-specific fpos_t representation and non-portable +# funopen. Not needed for bootstrapping, so just disable it. +.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) +SRCS+= zopen.c +.endif + .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" CFLAGS+= -DUNALIGNED_OK .endif diff --git a/tools/build/mk/Makefile.boot b/tools/build/mk/Makefile.boot index 8ac360e663c9..4e6f3508b30d 100644 --- a/tools/build/mk/Makefile.boot +++ b/tools/build/mk/Makefile.boot @@ -16,7 +16,6 @@ NM:= /usr/bin/nm # Avoid stale dependecy warnings: LIBC:= -LIBZ:= LIBM:= LIBUTIL:= LIBCPLUSPLUS:= @@ -30,6 +29,7 @@ LIBL:=${WORLDTMP}/legacy/usr/lib/libl.a LIBROKEN:=${WORLDTMP}/legacy/usr/lib/libroken.a LIBDWARF:=${WORLDTMP}/legacy/usr/lib/libdwarf.a LIBELF:=${WORLDTMP}/legacy/usr/lib/libelf.a +LIBZ:=${WORLDTMP}/legacy/usr/lib/libz.a # Add various -Werror flags to catch missing function declarations CFLAGS+= -Werror=implicit-function-declaration -Werror=implicit-int \