From: Alexandre Oliva Date: Thu, 12 Apr 2001 02:39:37 +0000 (+0000) Subject: * ltcf-c.sh (no_undefined_flag) [Solaris ld]: Change to -zdefs. X-Git-Tag: multi-language-merge-point~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a1e496a025b648f0dda09edd55de984a252cb37;p=thirdparty%2Flibtool.git * ltcf-c.sh (no_undefined_flag) [Solaris ld]: Change to -zdefs. * ltcf-cxx.sh (no_undefined_flag) [Solaris ld]: Likewise. * ltcf-gcj.sh (no_undefined_flag) [Solaris ld]: Likewise. (archive_cmds, archive_expsym_cmds, output_verbose_link_cmds, whole_archive_flag_spec) [Solaris]: Copy from ltcf-cxx.sh. --- diff --git a/ChangeLog b/ChangeLog index 76cfe0f4f..bc53ed87d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-04-11 Alexandre Oliva + + * ltcf-c.sh (no_undefined_flag) [Solaris ld]: Change to -zdefs. + * ltcf-cxx.sh (no_undefined_flag) [Solaris ld]: Likewise. + * ltcf-gcj.sh (no_undefined_flag) [Solaris ld]: Likewise. + (archive_cmds, archive_expsym_cmds, output_verbose_link_cmds, + whole_archive_flag_spec) [Solaris]: Copy from ltcf-cxx.sh. + 2001-04-11 Michael Matz * ltmain.in: Recognize "CC" as default --tag argument to resolve diff --git a/ltcf-c.sh b/ltcf-c.sh index 4c493c81f..17b65111c 100644 --- a/ltcf-c.sh +++ b/ltcf-c.sh @@ -505,7 +505,7 @@ else ;; solaris*) - no_undefined_flag=' -z text' + no_undefined_flag=' -z defs' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh index d135a1800..aefc206f9 100644 --- a/ltcf-cxx.sh +++ b/ltcf-cxx.sh @@ -540,7 +540,7 @@ case $host_os in case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ - no_undefined_flag=' -ztext' + no_undefined_flag=' -zdefs' archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' @@ -585,6 +585,7 @@ case $host_os in *) # GNU C++ compiler with Solaris linker if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag=' ${wl}-z ${wl}defs' if $CC --version | egrep -v '^2\.7' > /dev/null; then archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ diff --git a/ltcf-gcj.sh b/ltcf-gcj.sh index fb407ad37..2fa090c14 100644 --- a/ltcf-gcj.sh +++ b/ltcf-gcj.sh @@ -485,18 +485,22 @@ else ;; solaris*) - no_undefined_flag=' -z text' - # $CC -shared without GNU ld will not create a library from C++ - # object files and a static libstdc++, better avoid it by now - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + no_undefined_flag=' ${wl}-z ${wl}defs' + archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds='$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' - hardcode_libdir_flag_spec='-R$libdir' + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\"" + + hardcode_libdir_flag_spec='${wl}-R $wl$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs=yes ;;