Skip to content

Commit

Permalink
* libtool.m4 (LD): Append -melf* option to LD on IRIX with GNU ld.
Browse files Browse the repository at this point in the history
* ltconfig: Handle it.
* ltcf-cxx.sh: Use with_gnu_ld passed as a shell variable instead of
auto-detecting it.
  • Loading branch information
Alexandre Oliva committed Feb 20, 2003
1 parent eb9df11 commit 66511a6
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2003-02-19 Alexandre Oliva <aoliva@redhat.com>

* libtool.m4 (LD): Append -melf* option to LD on IRIX with GNU ld.
* ltconfig: Handle it.
* ltcf-cxx.sh: Use with_gnu_ld passed as a shell variable instead of
auto-detecting it.

2003-02-19 Alexandre Oliva <aoliva@redhat.com>

* ltcf-cxx.sh: Replace $linker_flags with $compiler_flags wherever
Expand Down
14 changes: 14 additions & 0 deletions libtool.m4
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,19 @@ case $host in
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
*N32*)
LD="${LD-ld} -melf32bmipn32"
;;
*64-bit*)
LD="${LD-ld} -melf64bmip"
;;
esac
else
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
Expand All @@ -155,6 +168,7 @@ case $host in
LD="${LD-ld} -64"
;;
esac
fi
fi
rm -rf conftest*
;;
Expand Down
17 changes: 10 additions & 7 deletions ltcf-cxx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,16 @@ if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (ev
# Set up default GNU C++ configuration

# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
egrep 'GNU ld' > /dev/null; then
with_gnu_ld=yes

# archiving commands below assume that GNU ld is being used. The
# assumption here is that the linker is going to be the same as that
# used by the C compiler. For the purposes of GCC, this is ok, but
# if someone uses g++ along with a non-GNU C compiler that doesn't
# use GNU ld, we may lose. This is ok for the toolchain tree, since
# the only users of ltcf-cxx.sh are libstdc++-v3 and libjava,
# anyway, and those use both gcc and g++, so the settings are bound
# to be the same.

if test "$with_gnu_ld" = yes; then
archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'

Expand All @@ -92,7 +97,6 @@ if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (ev
whole_archive_flag_spec=
fi
else
with_gnu_ld=no
wlarc=

# A generic and very simple default shared library creation
Expand All @@ -110,7 +114,6 @@ if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (ev

else
with_gcc=no
with_gnu_ld=no
wlarc=
fi

Expand Down
2 changes: 1 addition & 1 deletion ltconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ irix5* | irix6*)
version_type=linux
else
version_type=irix
if
fi
version_type=irix
need_lib_prefix=no
need_version=no
Expand Down

0 comments on commit 66511a6

Please sign in to comment.