svn commit: r294295 - in head: etc/defaults etc/rc.d sbin/ldconfig
Warner Losh
imp at FreeBSD.org
Mon Jan 18 21:40:20 UTC 2016
Author: imp
Date: Mon Jan 18 21:40:18 2016
New Revision: 294295
URL: https://svnweb.freebsd.org/changeset/base/294295
Log:
Add ldconfig -soft to process the soft float abi libraries and put it
into startup scripts for armv6. It acts much like ldconfig -32 does.
Modified:
head/etc/defaults/rc.conf
head/etc/rc.d/ldconfig (contents, props changed)
head/sbin/ldconfig/ldconfig.c
Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf Mon Jan 18 21:24:28 2016 (r294294)
+++ head/etc/defaults/rc.conf Mon Jan 18 21:40:18 2016 (r294295)
@@ -619,6 +619,9 @@ ldconfig_paths="/usr/lib/compat /usr/loc
# shared library search paths
ldconfig32_paths="/usr/lib32 /usr/lib32/compat"
# 32-bit compatibility shared library search paths
+ldconfigsoft_paths="/usr/libsoft /usr/libsoft/compat /usr/local/libsoft"
+ # soft float compatibility shared library search paths
+ # Note: temporarily with extra stuff for transition
ldconfig_paths_aout="/usr/lib/compat/aout /usr/local/lib/aout"
# a.out shared library search paths
ldconfig_local_dirs="/usr/local/libdata/ldconfig"
@@ -626,6 +629,9 @@ ldconfig_local_dirs="/usr/local/libdata/
ldconfig_local32_dirs="/usr/local/libdata/ldconfig32"
# Local directories with 32-bit compatibility ldconfig
# configuration files.
+ldconfig_localsoft_dirs="/usr/local/libdata/ldconfigsoft"
+ # Local directories with soft float compatibility ldconfig
+ # configuration files.
kern_securelevel_enable="NO" # kernel security level (see security(7))
kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure
# Note that setting securelevel to 0 will result
Modified: head/etc/rc.d/ldconfig
==============================================================================
--- head/etc/rc.d/ldconfig Mon Jan 18 21:24:28 2016 (r294294)
+++ head/etc/rc.d/ldconfig Mon Jan 18 21:40:18 2016 (r294295)
@@ -61,6 +61,28 @@ ldconfig_start()
;;
esac
+ case `sysctl -n hw.machine_arch` in
+ armv6)
+ for i in ${ldconfig_localsoft_dirs}; do
+ if [ -d "${i}" ]; then
+ _files=`find ${i} -type f`
+ if [ -n "${_files}" ]; then
+ ldconfigsoft_paths="${ldconfigsoft_paths} `cat ${_files} | sort -u`"
+ fi
+ fi
+ done
+ _LDC=""
+ for i in ${ldconfigsoft_paths}; do
+ if [ -r "${i}" ]; then
+ _LDC="${_LDC} ${i}"
+ fi
+ done
+ check_startmsgs &&
+ echo 'Soft Float compatibility ldconfig path:' ${_LDC}
+ ${ldconfig} -soft -m ${_ins} ${_LDC}
+ ;;
+ esac
+
# Legacy aout support for i386 only
case `sysctl -n hw.machine_arch` in
i386)
Modified: head/sbin/ldconfig/ldconfig.c
==============================================================================
--- head/sbin/ldconfig/ldconfig.c Mon Jan 18 21:24:28 2016 (r294294)
+++ head/sbin/ldconfig/ldconfig.c Mon Jan 18 21:40:18 2016 (r294295)
@@ -64,6 +64,7 @@ static const char rcsid[] =
#define _PATH_LD32_HINTS "/var/run/ld32.so.hints"
#define _PATH_ELF32_HINTS "/var/run/ld-elf32.so.hints"
+#define _PATH_ELFSOFT_HINTS "/var/run/ld-elf-soft.so.hints"
#undef major
#undef minor
@@ -111,6 +112,7 @@ main(int argc, char **argv)
int rval = 0;
int is_aout = 0;
int is_32 = 0;
+ int is_soft = 0;
while (argc > 1) {
if (strcmp(argv[1], "-aout") == 0) {
@@ -125,12 +127,18 @@ main(int argc, char **argv)
is_32 = 1;
argc--;
argv++;
+ } else if (strcmp(argv[1], "-soft") == 0) {
+ is_soft = 1;
+ argc--;
+ argv++;
} else {
break;
}
}
- if (is_32)
+ if (is_soft)
+ hints_file = _PATH_ELFSOFT_HINTS; /* Never will have a.out softfloat */
+ else if (is_32)
hints_file = is_aout ? _PATH_LD32_HINTS : _PATH_ELF32_HINTS;
else
hints_file = is_aout ? _PATH_LD_HINTS : _PATH_ELF_HINTS;
More information about the svn-src-head
mailing list