bug-libtool
[Top][All Lists]
Advanced

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

cygwin cross-compiling: wrong sys_lib_search_path_spec


From: Jan Nieuwenhuizen
Subject: cygwin cross-compiling: wrong sys_lib_search_path_spec
Date: Thu, 14 Aug 2003 22:07:24 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Hi,

I'm having a problem with libtool (CVS) when cross compiling for
Cygwin.  The strange thing is, that there's a special cygwin port
entry in libtool.m4, that seems to break generic cross compile magic.

libtool.m4:1105

    if test "$GCC" = yes; then
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | 
$SED -e "s/^libraries://" -e "s,=/,/,g"`

but then at 1206:

    cygwin* | mingw* | pw32*)

    <snip>

        case $host_os in
        cygwin*)
          # Cygwin DLLs use 'cyg' prefix rather than 'lib'
          soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} 
| $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
          sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
          ;;

That's of course never the right path when cross compiling.  I think
that I understand part of the problem: when building a cross linker
one can specify a custom path, for cygwin:

   --with-lib-path=SYSROOT/lib:SYSROOT/usr/lib:SYSROOT/usr/lib/w32api

and ld will understand:

    i686-cygwin-ld --verbose | grep lib
    SEARCH_DIR("/usr/i686-cygwin/lib"); SEARCH_DIR("/usr/i686-cygwin/lib"); 
SEARCH_DIR("/cygwin/usr/lib"); SEARCH_DIR("/cygwin/usr/lib/w32api");
      /* The Cygwin32 library uses a section to avoid copying certain data

However, I failed to find the corresponding configuration setting for
GCC, and the generic libtool trick for finding the library path does
not include the additional w32api directory.

So, is asking gcc for the linker path the right solution?  If so,
could we please use that for cygwin too, and could someone tell me
how to fix gcc' library search path?

Greetings,
Jan.
      
-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org





reply via email to

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