This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: building gcc on cygwin with --target=i486-linux-gnu


On 08 October 2006 17:03, Alexander Kotelnikov wrote:

>>>>>> On Sun, 8 Oct 2006 14:56:49 +0100
>>>>>> "DK" == Dave Korn <dave.korn@artimi.com> wrote:
>> 
>> On 08 October 2006 14:27, Alexander Kotelnikov wrote:
>>> 
>>> I tried to build gcc 4.1.1 as a cross-compiler for i486-linux-gnu on
>>> cygwin and the build failed with error
>>> 
>>> /opt/bin/i486-linux-gnu-ld: cannot find /lib/libc.so.6
>>> collect2: ld returned 1 exit status
>>> make[3]: *** [libgcc_s.so] Error 1
>>> 
>>> And there is really no /lib/libc.so.6 on cygwin. Can anyone explain
>>> what does this mean?
>> 
>>   It means libc for the target, not the host!
> 
> Hm... This explains something. But isn't it weird when linker tries to
> find target libc in /lib/libc.so.6? not in some specific place like
> /opt/i486-linux-gnu-ld/lib or some place like this, at least when I
> built a gcc cross compiler for sparc on linux the build process tried
> /opt/sparc-sun-solaris2.10/lib/libc.so.

  Don't know for sure.  It does seem inconsistent, but I'm not sure whether
that's the right thing to do either.  I'm not sure if it's meant to be valid
to configure a cross-compiler without /any/ options to tell it where to look
for headers and libs, or to tell it not to look (cf. --with-newlib,
'bootstrap' aka 'minimal' compiler) at all.

>> glibc for the same target at the same time.  If you have the pre-existing
>> libs, you copy them onto your build machine and point configure at them
>> using --with-sysroot (or --with-headers and --with-libs, but
>> --with-sysroot is preferred these days).
> 
> A-ha, --sys-root, ok, thanks.
> 
>>   What's the actual target you want to cross-compile for?  Do you have a
>> particular linux system in mind?
> 
> May be. Think it is a good idea to build for a concrete system first.

  It's a whole load less trouble if you can just copy /lib and /include across
from a real machine and use them to save the step of building a target glibc.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]