Skip to content

Commit

Permalink
ldconfig: only configure compat32 when kernel supports it
Browse files Browse the repository at this point in the history
and eliminate hard-coded arch list.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D42669
  • Loading branch information
kostikbel committed Nov 24, 2023
1 parent 393ac29 commit 73902ed
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libexec/rc/rc.d/ldconfig
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ ldconfig_start()
startmsg 'ELF ldconfig path:' ${_LDC}
${ldconfig} -elf ${_ins} ${_LDC}

machine_arch=$(sysctl -n hw.machine_arch)

case ${machine_arch} in
aarch64|amd64|powerpc64)
if check_kern_features compat_freebsd32; then
for i in ${ldconfig_local32_dirs}; do
if [ -d "${i}" ]; then
_files=`find ${i} -type f`
Expand All @@ -67,7 +64,7 @@ ldconfig_start()
startmsg '32-bit compatibility ldconfig path:' ${_LDC}
${ldconfig} -32 ${_ins} ${_LDC}
;;
esac
fi

fi
}
Expand Down

0 comments on commit 73902ed

Please sign in to comment.