X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=config;h=a3ccb5d9d2f1223e8f6e899f34aae5b094aa6b20;hp=4a8c185bd50db90bea08b01e2e93e737254ee052;hb=a4022932ee15766c2f308d7ef9ef699ae0d78e59;hpb=2a6144a1b6a790a88d14b90e5381a66dec32c1da diff --git a/config b/config index 4a8c185bd5..a3ccb5d9d2 100755 --- a/config +++ b/config @@ -654,15 +654,20 @@ case "$GUESSOS" in ;; *-*-sunos4) OUT="sunos-$CC" ;; - *86*-*-bsdi4) OUT="bsdi-elf-gcc"; options="$options no-sse2" ;; + *86*-*-bsdi4) OUT="BSD-x86-elf"; options="$options no-sse2 -ldl" ;; alpha*-*-*bsd*) OUT="BSD-generic64; options="$options -DL_ENDIAN" ;; powerpc64-*-*bsd*) OUT="BSD-generic64; options="$options -DB_ENDIAN" ;; sparc64-*-*bsd*) OUT="BSD-sparc64" ;; ia64-*-*bsd*) OUT="BSD-ia64" ;; amd64-*-*bsd*) OUT="BSD-x86_64" ;; - *86*-*-*bsd*) # assume highest libc.so.* version is the one in effect - libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null` - case "`(file $libc) 2>/dev/null`" in + *86*-*-*bsd*) # mimic ld behaviour when it's looking for libc... + if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD + libc=/usr/lib/libc.so + else # OpenBSD + # ld searches for highest libc.so.* and so do we + libc=`(ls /usr/lib/libc.so.* | tail -1) 2>/dev/null` + fi + case "`(file -L $libc) 2>/dev/null`" in *ELF*) OUT="BSD-x86-elf" ;; *) OUT="BSD-x86"; options="$options no-sse2" ;; esac ;;