Guido Draheim wrote:
> ... See - the libtool crossgcc support (to which I did
> contribute some of the time) can simply ask the cross-gcc
> for the local searchpath via `gcc -print-search-dirs` -
> this is needed for win32 compiles atleast, and I have a
> patch on my disk which generalizes the idea for all
> cross-gcc targets (since there have been problems with
> crosscompiling linux-to-linux). 

You mean this?

--- libtool.m4.orig     Thu Mar  7 16:58:42 2002
+++ libtool.m4  Thu Mar  7 17:04:23 2002
@@ -2312,6 +2312,13 @@
   dynamic_linker=no
   ;;
 esac
+
+# When cross-compiling, get the list of system library directories
+# from gcc if possible, since hardcoded paths above are surely wrong.
+if test "$GCC" = yes && test "$cross_compiling" = yes; then
+  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e 
+"s/^libraries://" -e "s/;/ /g"`
+fi
+
 AC_MSG_RESULT([$dynamic_linker])
 test "$dynamic_linker" = no && can_build_shared=no
 ##

I just spent two hours realizing why libtool could not link with shared
libraries when cross-compiling; it ended up being exactly the thing
you're talking about.  I created a patch according to your suggestion
on the libtool mailing list, and it makes life much nicer.

Is this in CVS yet?  By golly, it sure needs to be.

- Dan

_______________________________________________
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool

Reply via email to