]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4
authorAlbert Chin-A-Young <china@thewrittenword.com>
Wed, 17 May 2006 14:28:40 +0000 (14:28 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 17 May 2006 14:28:40 +0000 (14:28 +0000)
(_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG,
_LT_LANG_FC_CONFIG) [ aix4*, aix5*, hpux10*, hpux11* ]:
Introduce a new variable, hardcode_direct_static, which
would ignore hardcode_direct=yes if the result would create a
static library dependency. Static library dependencies are
immune to $shlibpath_var.
* tests/link-order.at: Take hardcode_direct and
hardcode_direct_static into consideration when testing
link order.

ChangeLog
libltdl/config/ltmain.m4sh
libltdl/m4/libtool.m4
tests/link-order.at

index 96717ed63f2fa9d81ccf313cf9a895ab51bea68f..9a6786785f4f26165b13d28c9b666422afea475c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-05-17  Albert Chin-A-Young  <china@thewrittenword.com>
+
+       * libltdl/config/ltmain.m4sh, libltdl/m4/libtool.m4
+       (_LT_LINKER_SHLIBS, _LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG,
+       _LT_LANG_FC_CONFIG) [ aix4*, aix5*, hpux10*, hpux11* ]:
+       Introduce a new variable, hardcode_direct_static, which
+       would ignore hardcode_direct=yes if the result would create a
+       static library dependency. Static library dependencies are
+       immune to $shlibpath_var.
+       * tests/link-order.at: Take hardcode_direct and
+       hardcode_direct_static into consideration when testing
+       link order.
+
 2006-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Eliminate quadratic scaling in argument parsing loop, for
        but also turn comma into space so $LD understands
        whole_archive_flag_spec correctly.
 
-       * libltdl/config/ltmain.m4sh (func_mode_link) <shell wrapper>: 
+       * libltdl/config/ltmain.m4sh (func_mode_link) <shell wrapper>:
        Add _AS_BOURNE_COMPATIBLE code from Autoconf, to fix issues
        with zsh and other shells.
        Reported by David Gómez Espinosa <david@pleyades.net>.
index 5872ad19d752a4e31fac13eebfdb13895932efa2..7a26e8157bb35cb47c5c60abc3c4ddecdccb1f1a 100644 (file)
@@ -3832,7 +3832,8 @@ func_mode_link ()
              fi
              ;;
            relink)
-             if test "$hardcode_direct" = yes; then
+             if test "$hardcode_direct" = yes &&
+                test "$hardcode_direct_static" = no; then
                add="$dir/$linklib"
              elif test "$hardcode_minus_L" = yes; then
                add_dir="-L$dir"
@@ -3887,7 +3888,8 @@ func_mode_link ()
            add_dir=
            add=
            # Finalize command for both is simple: just hardcode it.
-           if test "$hardcode_direct" = yes; then
+           if test "$hardcode_direct" = yes &&
+              test "$hardcode_direct_static" = no; then
              add="$libdir/$linklib"
            elif test "$hardcode_minus_L" = yes; then
              add_dir="-L$libdir"
index 6fcaee925ae0087b5e1382dc1f19b4819e72b474..2f98005349e69e7bb91cb903f2dac8393ad0a966 100644 (file)
@@ -3967,6 +3967,7 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   _LT_TAGVAR(hardcode_automatic, $1)=no
   _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_static, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
@@ -4205,7 +4206,7 @@ _LT_EOF
 
     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
       case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
        _LT_TAGVAR(ld_shlibs, $1)=no
        cat <<_LT_EOF 1>&2
 
@@ -4316,6 +4317,7 @@ _LT_EOF
 
       _LT_TAGVAR(archive_cmds, $1)=''
       _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_static, $1)=yes
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
@@ -4561,6 +4563,7 @@ _LT_EOF
        _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
        _LT_TAGVAR(hardcode_direct, $1)=yes
+       _LT_TAGVAR(hardcode_direct_static, $1)=yes
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
        # hardcode_minus_L: Not really in the search PATH,
        # but as the default location of the library.
@@ -4605,6 +4608,7 @@ _LT_EOF
          ;;
        *)
          _LT_TAGVAR(hardcode_direct, $1)=yes
+         _LT_TAGVAR(hardcode_direct_static, $1)=yes
          _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
          # hardcode_minus_L: Not really in the search PATH,
@@ -4975,6 +4979,11 @@ _LT_TAGDECL([], [hardcode_libdir_separator], [1],
 _LT_TAGDECL([], [hardcode_direct], [0],
     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
     DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_static], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    static, impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
 _LT_TAGDECL([], [hardcode_minus_L], [0],
     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
     into the resulting binary])
@@ -5134,6 +5143,7 @@ _LT_TAGVAR(always_export_symbols, $1)=no
 _LT_TAGVAR(archive_expsym_cmds, $1)=
 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_static, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
@@ -6390,6 +6400,7 @@ _LT_TAGVAR(always_export_symbols, $1)=no
 _LT_TAGVAR(archive_expsym_cmds, $1)=
 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_static, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
@@ -6523,6 +6534,7 @@ _LT_TAGVAR(always_export_symbols, $1)=no
 _LT_TAGVAR(archive_expsym_cmds, $1)=
 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_static, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
index f586e6bde4ce0ddeda038c3ba296c34c7c8437f4..403347a964cb1f34c997c221da5a52f003650150 100644 (file)
@@ -20,6 +20,7 @@
 
 AT_SETUP([Link order test.])
 AT_KEYWORDS([libtool])
+eval `$LIBTOOL --config | $EGREP '^(hardcode_direct|hardcode_direct_static|shrext_cmds)='`
 LDFLAGS="$LDFLAGS -no-undefined"
 
 prefix_old=`pwd`/old
@@ -68,9 +69,18 @@ case $host_os in
 aix* | interix*) ;;  # These systems have different path syntax
 *)
   # Do not error if we do not relink (e.g. static-only systems)
-  AT_CHECK([if $EGREP relinking stderr; then
-             $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' stdout
-           else :; fi], [0], [ignore], [], [echo "wrong link order"])
+  case $hardcode_direct$hardcode_direct_static in
+  yesno)
+    AT_CHECK([if $EGREP relinking stderr; then
+         $EGREP " .*\/new\/lib/libb$shrext_cmds .*\/old\/lib/libcee$shrext_cmds" stdout
+       else :; fi], [0], [ignore], [], [echo "wrong link order"])
+    ;;
+  *)
+    AT_CHECK([if $EGREP relinking stderr; then
+         $EGREP " -L.*\/new\/lib -lb -L.*\/old\/lib -lcee" stdout
+       else :; fi], [0], [ignore], [], [echo "wrong link order"])
+    ;;
+  esac
   ;;
 esac