Page MenuHomeFreeBSD

D43051.diff
No OneTemporary

D43051.diff

diff --git a/Makefile.inc1 b/Makefile.inc1
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2410,8 +2410,12 @@
_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.
@@ -2673,6 +2677,7 @@
${_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
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -359,10 +359,11 @@
.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
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -911,10 +911,11 @@
.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
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -303,6 +303,8 @@
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.

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 30, 2:26 PM (1 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17859441
Default Alt Text
D43051.diff (2 KB)

Event Timeline