Refine ELF detection on BSD platforms.
This commit is contained in:
parent
8d56c8b51c
commit
fe0b3d98c2
1 changed files with 8 additions and 3 deletions
11
config
11
config
|
@ -660,9 +660,14 @@ case "$GUESSOS" in
|
||||||
sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
|
sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
|
||||||
ia64-*-*bsd*) OUT="BSD-ia64" ;;
|
ia64-*-*bsd*) OUT="BSD-ia64" ;;
|
||||||
amd64-*-*bsd*) OUT="BSD-x86_64" ;;
|
amd64-*-*bsd*) OUT="BSD-x86_64" ;;
|
||||||
*86*-*-*bsd*) # assume highest libc.so.* version is the one in effect
|
*86*-*-*bsd*) # mimic ld behaviour when it's looking for libc...
|
||||||
libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null`
|
if [ -L /usr/lib/libc.so ]; then # [Free|Net]BSD
|
||||||
case "`(file $libc) 2>/dev/null`" in
|
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" ;;
|
*ELF*) OUT="BSD-x86-elf" ;;
|
||||||
*) OUT="BSD-x86"; options="$options no-sse2" ;;
|
*) OUT="BSD-x86"; options="$options no-sse2" ;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
|
Loading…
Reference in a new issue