1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

ldconfig: only configure compat32 when kernel supports it

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
This commit is contained in:
Konstantin Belousov 2023-11-18 15:09:30 +02:00
parent 393ac29f0b
commit 73902ed85a

View File

@ -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`
@ -67,7 +64,7 @@ ldconfig_start()
startmsg '32-bit compatibility ldconfig path:' ${_LDC}
${ldconfig} -32 ${_ins} ${_LDC}
;;
esac
fi
fi
}