Hello Peter, * Peter O'Gorman wrote on Thu, Sep 14, 2006 at 05:22:30PM CEST: > On Sep 14, 2006, at 4:18 AM, Kate Minola wrote: > > >Why not use the output of "gcc -print-search-dirs" [...] > Well, because I would rather use the flags that the compiler actually > uses rather than the ones it says it uses, I'm still not sure that my > method is best though...
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. > I also came up with the awk expression from hell :-) You also came up with a writedown that was unreadable as hell. ;-) (There is no need to avoid newlines; in the single-quoted awk script you don't even have to backslash-quote them.) You definitely want to use a real and valid object file as input. You want to skip all user-provided paths in CFLAGS or LDFLAGS. And please try it with echo -L/foo/bar/././/// as input. And please take a look at the Autoconf portability section about awk, this code is not gawk-only. Cheers, and thanks, Ralf _______________________________________________ Bug-libtool mailing list Bug-libtool@gnu.org http://lists.gnu.org/mailman/listinfo/bug-libtool