$deplibs list. This causes problems when the link pass tries to
find libraries when they are located in non-standard places
denoted by -L options. Due to the reversed order these -L options
occur after the libraries that need them, and they are not found:
* config/ltmain.in: (Un)Reverse $deplibs list at the start of the
link pass in lib mode.
+2004-09-22 Andreas Schwab <schwab@suse.de>
+
+ The dlpreopen pass over libraries reverses the elements in the
+ $deplibs list. This causes problems when the link pass tries to
+ find libraries when they are located in non-standard places
+ denoted by -L options. Due to the reversed order these -L options
+ occur after the libraries that need them, and they are not found:
+
+ * config/ltmain.in: (Un)Reverse $deplibs list at the start of the
+ link pass in lib mode.
+
2004-09-22 Charles Wilson <cwilson@spam.protected>
* ltmain.in (func_generate_dlsyms) [cygwin, mingw]: when creating
esac
for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"