]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Merged the last few changes to the multi-language-branch made after the
authorGary V. Vaughan <gary@gnu.org>
Mon, 25 Jun 2001 20:42:45 +0000 (20:42 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 25 Jun 2001 20:42:45 +0000 (20:42 +0000)
original mergepoint:

2000-06-04  Mark Mitchell  <mark@codesourcery.com>

        * ltcf-c.sh (archive_cmds, archive_expsym_cmds) [solaris,
        with_gcc]: Use `gcc -shared' to build a shared library.

2001-06-04  John David Anglin  <dave@hiauly1.hia.nrc.ca>

        * ltcf-c.sh (archive_cmd) [hpux, with_gcc]: Use gcc to link shared
        archives.

2001-05-28  Simon Patarin <simon.patarin@inria.fr>

        * ltcf-cxx.sh (osf3/osf4/osf5): Support creation of C++  shared
        libraries when using g++ with native linker.

2001-05-28  Albert Chin  <china@thewrittenword.com>

        * ltconfig.in (version_type, soname_spec) [aix4* | aix5*]: Use
        linux-style versioning, and remove trailing .o from soname_spec.

2001-05-22  Alexandre Oliva  <aoliva@redhat.com>

        * ltcf-cxx.sh (allow_undefined_flag, no_undefined_flag)
        [aix4*|aix5*]: Prepend blank.

2001-05-20  Alexandre Oliva  <aoliva@redhat.com>

        * ltconfig.in: Fix sh.test regression introduced in previous patch.

        * ltconfig.in (lt_cv_sys_max_cmd_len): Improve test to work better
        in case of non-built-in echo.  Set bounds correctly.

        * ltcf-cxx.sh (allow_undefined_flag) [aix4* | aix5*]: Fix quote
        error.

        * ltmain.in (exec_cmd): New variable.  Don't exec programs within
        the big `case'; set the variable instead, and exec the cmd
        afterwards, so that the shell gets a chance to clean up here-doc
        files.
        * NEWS: Update.

2001-05-16  Alan Modra  <amodra@one.net.au>

        * libtool.m4 (lt_cv_deplibs_check_method): pass_all for hppa*-linux.

2001-05-03  Andreas Jaeger  <aj@suse.de>, Andreas Schwab  <schwab@suse.de>

        * ltmain.in (relink_command): Arrange for wrapper script to save
        output to a variable and display it only if relinking fails.

ChangeLog.1
libtool.m4
ltmain.in

index 0b7f0befa7b986b2706a857addc5e27c668e57b8..22da5effd4733ead7eb719863fe2b15268ffc7cb 100644 (file)
@@ -1,9 +1,57 @@
+2000-06-04  Mark Mitchell  <mark@codesourcery.com>
+
+       * ltcf-c.sh (archive_cmds, archive_expsym_cmds) [solaris,
+       with_gcc]: Use `gcc -shared' to build a shared library.
+
+2001-06-04  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * ltcf-c.sh (archive_cmd) [hpux, with_gcc]: Use gcc to link shared
+       archives.
+
+2001-05-28  Simon Patarin <simon.patarin@inria.fr>
+
+       * ltcf-cxx.sh (osf3/osf4/osf5): Support creation of C++  shared
+       libraries when using g++ with native linker.
+
+2001-05-28  Albert Chin  <china@thewrittenword.com>
+
+       * ltconfig.in (version_type, soname_spec) [aix4* | aix5*]: Use
+       linux-style versioning, and remove trailing .o from soname_spec.
+
+2001-05-22  Alexandre Oliva  <aoliva@redhat.com>
+
+       * ltcf-cxx.sh (allow_undefined_flag, no_undefined_flag)
+       [aix4*|aix5*]: Prepend blank.
+
 2001-05-20  Alexandre Oliva  <aoliva@redhat.com>
 
        * configure.in: Reverted to 1.4, to avoid confusion with MLB.
        Mainline is the release snapshot, except for the ChangeLog version
        number, until the multi-language branch is merged into it.
 
+       * ltconfig.in: Fix sh.test regression introduced in previous patch.
+
+       * ltconfig.in (lt_cv_sys_max_cmd_len): Improve test to work better
+       in case of non-built-in echo.  Set bounds correctly.
+
+       * ltcf-cxx.sh (allow_undefined_flag) [aix4* | aix5*]: Fix quote
+       error.
+
+       * ltmain.in (exec_cmd): New variable.  Don't exec programs within
+       the big `case'; set the variable instead, and exec the cmd
+       afterwards, so that the shell gets a chance to clean up here-doc
+       files.
+       * NEWS: Update.
+
+2001-05-16  Alan Modra  <amodra@one.net.au>
+
+       * libtool.m4 (lt_cv_deplibs_check_method): pass_all for hppa*-linux.
+
+2001-05-03  Andreas Jaeger  <aj@suse.de>, Andreas Schwab  <schwab@suse.de>
+
+       * ltmain.in (relink_command): Arrange for wrapper script to save
+       output to a variable and display it only if relinking fails.
+
 2001-04-25  Gary V. Vaughan  <gvv@techie.com>
 
        * configure.in: bumped version to 1.4a.
index 4db818c2af7cda27aa6cc2f6e583d0e731375fb6..2c1cb741d48fddbb24191835bf59ba7e3e114ec0 100644 (file)
@@ -977,8 +977,9 @@ aix4* | aix5*)
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
     if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
-      # lib<name>.a to let people know that these are not typical AIX shared libraries.
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
     else
       # We preserve .a as extension for shared libraries through AIX4.2
@@ -1850,7 +1851,7 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux*)
   case $host_cpu in
-  alpha* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* )
+  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* )
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
@@ -2556,19 +2557,6 @@ case $host_os in
     # NetBSD uses g++ - do we need to do anything?
     ;;
   osf3*)
-    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-      # 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_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-    fi
-
     case $cc_basename in
       KCC)
         # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -2609,25 +2597,26 @@ case $host_os in
         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
         ;;
       *)
-        # FIXME: insert proper C++ library support
-        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          # 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_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+
+       else
+          # FIXME: insert proper C++ library support
+          _LT_AC_TAGVAR(ld_shlibs, $1)=no
+        fi
         ;;
     esac
     ;;
   osf4* | osf5*)
-    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-      # 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_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
-    fi
-
     case $cc_basename in
       KCC)
         # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -2671,8 +2660,22 @@ case $host_os in
         output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
         ;;
       *)
-        # FIXME: insert proper C++ library support
-        _LT_AC_TAGVAR(ld_shlibs, $1)=no
+        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          # 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_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+
+       else
+          # FIXME: insert proper C++ library support
+          _LT_AC_TAGVAR(ld_shlibs, $1)=no
+       fi
         ;;
     esac
     ;;
@@ -4254,10 +4257,17 @@ else
     ;;
 
   hpux9* | hpux10* | hpux11*)
-    case $host_os in
-    hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
-    *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
-    esac
+    if test $with_gcc = yes; then
+      case $host_os in
+      hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+      *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
+      esac
+    else
+      case $host_os in
+      hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+      *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+      esac
+    fi
     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
@@ -4349,11 +4359,15 @@ else
 
   solaris*)
     _LT_AC_TAGVAR(no_undefined_flag, $1)=' -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
-    _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+    if test "$with_gcc" = yes; then
+      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      _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'
+    else
+      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _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'
+    fi
     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
     case $host_os in
index 3f2241df63e9b45269ba6e5dbb361b30c1af6c58..283227013fc4aaab84ce3d514f39e80884a250c6 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -240,6 +240,11 @@ if test -n "$prevopt"; then
   exit 1
 fi
 
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
 if test -z "$show_help"; then
 
   # Infer the operation mode.
@@ -4842,11 +4847,10 @@ relink_command=\"$relink_command\""
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec $SHELL $0 --finish$current_libdirs
-      exit 1
+      exec_cmd='$SHELL $0 --finish$current_libdirs'
+    else
+      exit 0
     fi
-
-    exit 0
     ;;
 
   # libtool finish mode
@@ -5049,11 +5053,8 @@ relink_command=\"$relink_command\""
        LANG="$save_LANG"; export LANG
       fi
 
-      # Now actually exec the command.
-      eval "exec \$cmd$args"
-
-      $echo "$modename: cannot exec \$cmd$args"
-      exit 1
+      # Now prepare to actually exec the command.
+      exec_cmd='"$cmd"$args'
     else
       # Display what would be done.
       if test -n "$shlibpath_var"; then
@@ -5232,11 +5233,18 @@ relink_command=\"$relink_command\""
     ;;
   esac
 
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$generic_help" 1>&2
-  exit 1
+  if test -z "$exec_cmd"; then
+    $echo "$modename: invalid operation mode \`$mode'" 1>&2
+    $echo "$generic_help" 1>&2
+    exit 1
+  fi
 fi # test -z "$show_help"
 
+if test -n "$exec_cmd"; then
+  eval exec $exec_cmd
+  exit 1
+fi
+
 # We need to display help for each of the modes.
 case $mode in
 "") $echo \