From nobody Thu Jan 18 22:31:45 2024 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 4TGHXy4208z578sn; Thu, 18 Jan 2024 22:31:46 +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 4TGHXy1mzZz4CV2; Thu, 18 Jan 2024 22:31:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617106; 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=PL3Jrs4Lsr6cuHFU25nAXR+rhnQ5uLsld1vwK+nPCsA=; b=G1zbeL6zMjgs9nwDLjpDGYE270Zs2s1hIb9g3zQiRBkCHDcv23RWuqZhTvzcXecO/o87Pv i1Mhg/qKZXyCN0piAfUy0ERMj45IRoBL+dniyqNE5mxYsVP2LmQrIxDCcbgi6spN3gwgzm c2zLPHqrLPOdmSMXxCuz965kKgwWwIlbCHhbazCNiO9ijCNf0+tZeVw3SOt3xlbMvu44/9 vEoUrNID7EzOCvUD0bt4cOoZSDJF88ybgvN0NYMxyPJOdSwqBPaqz18A5sSsjq7or9tzXK 99M8htwzh6Zg5mp1i2fdu+rNXXBl0h5RxobtEFze5rTvQ4HtcB8XEnOA/dreyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705617106; 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=PL3Jrs4Lsr6cuHFU25nAXR+rhnQ5uLsld1vwK+nPCsA=; b=c6/LYu0j4ZbR2b+Q17pno6ro8YzvWTlxWAGZf6MlVsyaQyutirZ+CnNaruqWdl0oPYOqOt IQNLXIYhXu/vF3thgMht8hgZGHUOWjs8ayzBUkozvbAXSEotY9rtlq2ZFaQQLTRLvig6fn kKgzGHBn3Rz+Vxcan3G9nkk+vV/XZsqA+QmiH7AW6xOOOcl9iIZEEQDjHuUmJigw7x6z5B 9E6g6oXMWAnbjhczTJ+N7xzAe1m5MJkwDCMi41STUJcD5juIVz9JQZ0RkoFLk3KTfTMjVS CCK2/7U6K0KabXHypqm8itKSjAo2cW2N5ED4rrUl/p9IX3uDrNuIi9ZNKJoOcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705617106; a=rsa-sha256; cv=none; b=ArQ9LHB3WjmtpQ4w1y99jCkrTd1woN7YjtPxTzHOKLirCq9y504zzSsNKfWIFH9giD2KF0 4aY7/MSHYza6GngKtTsqHDgrCyCyMh8ZnKN4PJKlV+/cfCMlDhEarRSYDAGg14R8X8naK3 qALsu8U9HnpWSZjKbDWmKM6QRSYeKaTQ8d5GMlHw03Esdw+pjhWVsHkstOHYxVHrKQrhZe /fUfBaeeEJ1ITlUlvbqX9bH8ThMPbocjqxeDSEMFkKB1VfkJ1jknpEpwBnQzNci3HRJoO6 aW8cbkG991MCR1tJHUbsrmLtHx8pIjFQwH7Cs/bQq9tCJhjIuE3vDtc3VHduIA== 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 4TGHXy0YcRzQn5; Thu, 18 Jan 2024 22:31:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40IMVjqn005305; Thu, 18 Jan 2024 22:31:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IMVjnn005302; Thu, 18 Jan 2024 22:31:45 GMT (envelope-from git) Date: Thu, 18 Jan 2024 22:31:45 GMT Message-Id: <202401182231.40IMVjnn005302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 2fbed5e9ea84 - stable/14 - Make kldxref a bootstrap tool and use unconditionally 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2fbed5e9ea843c6747fba6d3cd209c3d5860617a Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2fbed5e9ea843c6747fba6d3cd209c3d5860617a commit 2fbed5e9ea843c6747fba6d3cd209c3d5860617a Author: Jessica Clarke AuthorDate: 2023-12-13 21:43:10 +0000 Commit: John Baldwin CommitDate: 2024-01-18 22:30:06 +0000 Make kldxref a bootstrap tool and use unconditionally Now that kldxref is a generic cross tool and can be built on non-FreeBSD we can bootstrap it during the build and thus remove the condition for whether it exists. We also need to make sure to add it to the METALOG for -DNO_ROOT builds. Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D43051 (cherry picked from commit ff7c12c1f17e52337169d8ce48433fae96a9c9db) --- Makefile.inc1 | 5 +++++ sys/conf/kmod.mk | 9 +++++---- sys/modules/Makefile | 9 +++++---- tools/build/Makefile | 2 ++ 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 857aed8e703c..3537cf5ac579 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2409,8 +2409,12 @@ _bootstrap_tools_links+=m4 lex _elftoolchain_libs= lib/libelf lib/libdwarf lib/libzstd ${_bt}-lib/libelf: ${_bt_m4_depend} ${_bt}-lib/libdwarf: ${_bt_m4_depend} +_bt_libelf_depend=${_bt}-lib/libelf .endif +_kldxref= usr.sbin/kldxref +${_bt}-usr.sbin/kldxref: ${_bt_libelf_depend} + # flua is required to regenerate syscall files. It first appeared during the # 13.0-CURRENT cycle, thus needs to be built on -older releases and stable # branches. @@ -2672,6 +2676,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_cat} \ ${_kbdcontrol} \ ${_elftoolchain_libs} \ + ${_kldxref} \ lib/libopenbsd \ usr.bin/mandoc \ usr.bin/rpcgen \ diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk index ce1e7a31a865..48872f88932d 100644 --- a/sys/conf/kmod.mk +++ b/sys/conf/kmod.mk @@ -361,10 +361,11 @@ afterinstall: _kldxref .ORDER: realinstall _kldxref .ORDER: _installlinks _kldxref _kldxref: .PHONY - @if type kldxref >/dev/null 2>&1; then \ - ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ - ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ - fi + ${KLDXREF_CMD} ${DESTDIR}${KMODDIR} +.if defined(NO_ROOT) && defined(METALOG) + echo ".${DISTBASE}${KMODDIR}/linker.hints type=file mode=0644 uname=root gname=wheel" | \ + cat -l >> ${METALOG} +.endif .endif .endif # !target(realinstall) diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 4b98c7ed6e0d..b34d20dd9147 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -909,10 +909,11 @@ SUBDIR:= ${SUBDIR:N${reject}} .if !defined(NO_XREF) .MAKEFLAGS+= -DNO_XREF afterinstall: .PHONY - @if type kldxref >/dev/null 2>&1; then \ - ${ECHO} ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ - ${KLDXREF_CMD} ${DESTDIR}${KMODDIR}; \ - fi + ${KLDXREF_CMD} ${DESTDIR}${KMODDIR} +.if defined(NO_ROOT) && defined(METALOG) + echo ".${DISTBASE}${KMODDIR}/linker.hints type=file mode=0644 uname=root gname=wheel" | \ + cat -l >> ${METALOG} +.endif .endif SUBDIR:= ${SUBDIR:u:O} diff --git a/tools/build/Makefile b/tools/build/Makefile index bd573a38fc75..92f7d396825c 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -295,6 +295,8 @@ SYSINCS+= ${SRCTOP}/sys/sys/elf.h SYSINCS+= ${SRCTOP}/sys/sys/ctf.h # for kbdcontrol: SYSINCS+= ${SRCTOP}/sys/sys/kbio.h +# for kldxref: +SYSINCS+= ${SRCTOP}/sys/sys/module.h # We want to run the build with only ${WORLDTMP} in $PATH to ensure we don't # accidentally run tools that are incompatible but happen to be in $PATH.