On Sep 15, 2006, at 1:08 AM, Ralf Wildenhues wrote:

Hi Ralf,
Okay, I don't think my solution solves anything :/. My gcc compiler in /opt/gcc-4.0.1 only passes -L flags for /opt/gcc-4.0.1/lib/gcc/ powerpc-apple-darwin8.2.0/4.0.1 and /opt/gcc-4.0.1/lib, but -print- search-dirs also includes /usr/lib and /lib etc.


You may want to read this:
http://lists.gnu.org/archive/html/libtool-patches/2005-01/ msg00181.html
and then decide whether to ignore it or not.  If yes, then that should
be documented.

(I think the reverse downside was that gcc would not list search dirs
that don't exist at the time; but I haven't tested it either and can't
find a reference to this now.)

While looking into a patch for this, I notice that
sys_lib_search_path_spec is not a tagged var, so we run it for each
compiler for each tag, with the latest one it finds being the final
answer. Does not seem quite right to me.

Good catch.  Probably doing this for the C compiler only should be
enough.

Also we seem to use $AWK in libtool.m4 (and substituted into libtool) without setting it anywhere when "$lt_cv_nm_interface" = "MS dumpbin"



I also came up with the awk expression from hell :-)

Here is what should be a readable portable awk expression from hell, but I need to return to square 1 for an actual problem solution.

Peter

awk '
BEGIN {RS=" "; FS="/"; } /-L\// {
  foo="";
  for (i = NF; i > 0; i--) {
    if ($i != "" && $i != "." && $i != "-L" && $i != "\n") {
      if ($i == "..") { count++ }
      else if (count == 0) {
        if (foo == "") { foo=$i }
        else { foo=$i "/" foo }
      }
      else { count-- }
    }
    else if ($i == "-L") { foo="/" foo }
  }
  if (foo != "") { freq[foo]++ }
  if (freq[foo] == 1) { print foo }
}'




_______________________________________________
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool

Reply via email to