* libtool.m4 (archive_cmds, archive_expsym_cmds) [solaris*]: Changing

no_undefined_flag from `-z text' to `-z defs' (see entry below at
2001-04-11  Alexandre Oliva  <aoliva@redhat.com>) has a problem.
when linking a shared library with gcc calling /usr/ccs/bin/ld (eg.
the gcc supplied with Solaris 8 companion CD), using the flag
-no-undefined, shared library linking will always fail because of
the unresolved symbols from libgcc.a.  Consequently we have to
provide a path to libgcc.a when linking shared libraries in
conjunction with -no-undefined!
This commit is contained in:
Gary V. Vaughan 2001-09-06 21:54:16 +00:00
parent adc412c82b
commit 45b41fe058
2 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,15 @@
2001-09-06 Gary V. Vaughan <gary@gnu.org>
* libtool.m4 (archive_cmds, archive_expsym_cmds) [solaris*]: Changing
no_undefined_flag from `-z text' to `-z defs' (see entry below at
2001-04-11 Alexandre Oliva <aoliva@redhat.com>) has a problem.
when linking a shared library with gcc calling /usr/ccs/bin/ld (eg.
the gcc supplied with Solaris 8 companion CD), using the flag
-no-undefined, shared library linking will always fail because of
the unresolved symbols from libgcc.a. Consequently we have to
provide a path to libgcc.a when linking shared libraries in
conjunction with -no-undefined!
From Michael Pruett <mpruett@engr.sgi.com>:
* libltdl/ltdl.c (find_module): `0' valued arguments to
tryall_dlopen_module() must be explicitly cast to avoid compiler

8
libtool.m4 vendored
View File

@ -4865,13 +4865,13 @@ EOF
solaris*)
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
if test "$GXX" = yes; then
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" && $CC --print-libgcc-file-name`'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" && $CC --print-libgcc-file-name`~$rm $lib.exp'
else
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" && $CC --print-libgcc-file-name`'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags `test "x$allow_undefined_flag" = "x$no_undefined_flag" && $CC --print-libgcc-file-name`~$rm $lib.exp'
fi
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no