Hello Peter, George,
* Peter O'Gorman wrote on Tue, Mar 18, 2008 at 06:40:59AM CET:
George Bosilca wrote:
After digging into the gcc man pages, I found that in order to
have the
expected behavior (or at least what I think is expected: look into
the
user provided lib path for all libraries independing if they are
static
or dynamic) one has to add the -Wl,-search_paths_first flags to
the link
command. From the gcc documentation, it seems that this is not
necessarily MAC OS X specific (but I didn't test it elsewhere).
If linking libtool libraries, then libtool should add the full path
to
the static archive (e.g. ../foo/libfoo.a) when calling the linker.
This
will overcome even the OS X linker which searches all -L paths for a
dylib before going back to the start again looking for a .a.
So all libs linked with -static should be fine (-static links
statically
all uninstalled libtool libraries), as should be all linked with
-static-libtool-libs (which links statically all libtool libraries),
no?
That --disable-shared was given will only prevent libtool from
creating
shared libraries, not from using them.
Feel free to add -Wl,-search_paths_first to LDFLAGS if $host is
darwin*.
I am not sure that this should be handled in libtool, I'd be fine
with
adding it by default if another maintainer agrees.
Are you speaking about the -all-static case now? Or some other case?
Thanks,
Ralf