[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cross-compiling question: static libraries and binaries to different

From: Dan Kegel
Subject: Re: cross-compiling question: static libraries and binaries to different places?
Date: Thu, 07 Mar 2002 17:45:16 -0800

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 @@
+# 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"`
 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]