]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltcf-cxx.sh (compiler_lib_search_path), ltconfig.in
authorOssama Othman <ossama@debian.org>
Tue, 6 Jun 2000 03:23:51 +0000 (03:23 +0000)
committerOssama Othman <ossama@debian.org>
Tue, 6 Jun 2000 03:23:51 +0000 (03:23 +0000)
(compiler_lib_search_path), ltmain.in (libs): The library path
that the compiler uses internally was being placed before the one
supplied by the user.  Added a loop that moves that path after the
user supplied one.
Reported by Stephan Kulow <coolo@kde.org> and Michael Matz
<matz@ifh.de>

ChangeLog
ltcf-cxx.sh
ltconfig.in
ltmain.in

index 04ff393eb1e04b1c35816c147193f2779bc5e91f..ad0e32bb839f2d69e5439727d8bd234168da9c9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-06-05  Ossama Othman  <ossama@debian.org>
+
+       * ltcf-cxx.sh (compiler_lib_search_path), ltconfig.in
+       (compiler_lib_search_path), ltmain.in (libs): The library path
+       that the compiler uses internally was being placed before the one
+       supplied by the user.  Added a loop that moves that path after the
+       user supplied one.
+       Reported by Stephan Kulow <coolo@kde.org> and Michael Matz
+       <matz@ifh.de>
+
 2000-05-30  Gary V. Vaughan  <gvv@techie.com>
 
        * ltconfig.in (ORIGINAL_CONFIG_SHELL): Prevent lossage when
index bceb031a216845abf261fadc7fd92634d6e1968f..a75fb5523808898734dcb941bc17de9fc1027337 100644 (file)
@@ -727,7 +727,7 @@ EOF
 
 if eval $ac_compile 2>&5; then
   # Parse the compiler output and extract the necessary
-  # object, libraries and library flags.
+  # objects, libraries and library flags.
 
   # Sentinel used to keep track of whether or not we are before
   # the conftest object file.
@@ -749,11 +749,20 @@ if eval $ac_compile 2>&5; then
        fi
 
        if test "$pre_test_object_deps_done" = no; then
-         if test -z "$predeps"; then
-           predeps="${prev}${p}"
-         else
-           predeps="${predeps} ${prev}${p}"
-         fi
+         case $p in
+        -L* | -R*)
+          # Internal compiler library paths should come after those
+          # provided the user.  The postdeps already come after the
+          # user supplied libs so there is no need to process them.
+           if test -z "$compiler_lib_search_path"; then
+             compiler_lib_search_path="${prev}${p}"
+           else
+             compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
+           fi
+           ;;
+         # The "-l" case would never come before the object being
+         # linked, so don't bother handling this case.
+         esac
        else
          if test -z "$postdeps"; then
            postdeps="${prev}${p}"
index 4a1abe28128a792e457b3c34cf4613ebdef74594..c05908612f2d8f72f7dad68df051fe39ba3f5bb6 100755 (executable)
@@ -222,6 +222,7 @@ predep_objects=
 postdep_objects=
 predeps=
 postdeps=
+compiler_lib_search_path=
 
 ## Link characteristics:
 allow_undefined_flag=
@@ -1925,7 +1926,7 @@ case "$ltmain" in
     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
-    predep_objects postdep_objects predeps postdeps \
+    predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
     old_striplib striplib file_magic_cmd export_symbols_cmds \
     deplibs_check_method allow_undefined_flag no_undefined_flag \
     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
@@ -2219,6 +2220,10 @@ predeps=$predeps
 # shared library.
 postdeps=$postdeps
 
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$compiler_lib_search_path
+
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$deplibs_check_method
 
index f9d76c24ea99edd095622c5211bacef61ffc9201..564213622d49cca3f1fe2000853e75eb55fbe0c2 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1470,7 +1470,7 @@ EOF
     done
 
     if test $linkmode = lib; then
-      libs="$predeps $libs $postdeps"
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
     fi
 
     deplibs=