libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH: sysroot branch] [cygwin] Minor sysroot fixups.


From: Charles Wilson
Subject: Re: [PATCH: sysroot branch] [cygwin] Minor sysroot fixups.
Date: Mon, 23 Aug 2010 20:53:29 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

On 8/23/2010 8:42 PM, Roumen Petrov wrote:
> $ /opt/mingw/i386-mingw32msvc/bin/gcc --print-file-name crt0.o; echo $?
> crt0.o
> 0
> 
> $ /opt/mingw/i386-mingw32msvc/bin/gcc --print-file-name crt1.o; echo $?
> /opt/mingw/lib/gcc/i386-mingw32msvc/3.4.5/../../../../i386-mingw32msvc/lib/crt1.o
> 
> 0
> 
> 
> This is my result is cross-compiler is not build with sysroot.

We're talking about cygwin, not mingw.  The sysroot tests should be
skipped if (a) the compiler doesn't have sysroots, or (b) libtool can't
determine the installation prefix underneath the sysroot.

Now, determining whether the compiler has sysroots is easy -- you ask
it: `${triple}-gcc -print-sysroot'

Figuring out the installation prefix underneath the sysroot is a little
trickier, and sysroot.at does this by looking for

crt1.o, crt2.o, crti.o, (and now, crt0.o)

If if finds ANY of those, AND the directory in which they are found is
underneath the sysroot, THEN the installation prefix can be deduced --
and the test will be performed rather than skipped.  This wasn't working
with a cygwin-cross-compiler that HAD sysroot support; now it works
(that is, is WAS skipping the tests erroneously; now it goes ahead and
performs the tests).

It was ALREADY working (thanks to crt1.o) for mingw-cross-compilers with
sysroot support. (e.g. it does not skip the tests in this configuration).

Skipping these tests, when the compiler doesn't support sysroots -- as
in your case -- is the correct behavior; this patch doesn't change that
behavior.

--
Chuck



reply via email to

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