From: Ossama Othman Date: Tue, 6 Jun 2000 03:23:51 +0000 (+0000) Subject: * ltcf-cxx.sh (compiler_lib_search_path), ltconfig.in X-Git-Tag: multi-language-merge-point~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b475baf468b7121964292e6cc282d3e2f41f6480;p=thirdparty%2Flibtool.git * 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 and Michael Matz --- diff --git a/ChangeLog b/ChangeLog index 04ff393eb..ad0e32bb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-06-05 Ossama Othman + + * 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 and Michael Matz + + 2000-05-30 Gary V. Vaughan * ltconfig.in (ORIGINAL_CONFIG_SHELL): Prevent lossage when diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh index bceb031a2..a75fb5523 100644 --- a/ltcf-cxx.sh +++ b/ltcf-cxx.sh @@ -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}" diff --git a/ltconfig.in b/ltconfig.in index 4a1abe281..c05908612 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -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 diff --git a/ltmain.in b/ltmain.in index f9d76c24e..564213622 100644 --- 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=