Fix LD setting for 64-bit Solaris 2/x86.

* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK) [*-*-solaris*):
Determine GNU ld options for 64-bit Solaris 2/x86.  Detect gld
2.21 _sol2 emulations.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Rainer Orth 2011-02-01 07:34:26 +01:00 committed by Ralf Wildenhues
parent 286e87b103
commit 9196966580
2 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2011-02-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> (tiny change)
Fix LD setting for 64-bit Solaris 2/x86.
* libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK) [*-*-solaris*):
Determine GNU ld options for 64-bit Solaris 2/x86. Detect gld
2.21 _sol2 emulations.
2011-01-27 Peter O'Gorman <peter@pogma.com>
Don't loop through wrapper script arguments unnecessarily.

17
libltdl/m4/libtool.m4 vendored
View File

@ -1374,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
CFLAGS="$SAVE_CFLAGS"
fi
;;
sparc*-*solaris*)
*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
yes*)
case $host in
i?86-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
LD="${LD-ld} -m elf64_sparc"
;;
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
LD="${LD-ld}_sol2"
fi
;;
*)
if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
LD="${LD-ld} -64"