This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: cross compiling stage 1 libgcc fails


On 03/06/2013 06:24 PM, c523716 wrote:
> Andrew Haley <aph <at> redhat.com> writes:
>> On 03/06/2013 06:05 PM, c522473 wrote:
>>> gcc tries to include/link the target libc. I have not build that as I do not
>>> have a working cross compiler. What am I missing?
>>
>> Bootstrapping, you need a target libc first.  How you get one depends
>> on the target.  If the target is GNU/Linux, you can copy everything
>> from a working system.
>>
>> So, what is your target?
> 
> GNU/Linux x86 or Amd64. I am not able to just copy working
> binaries/libraries.

Why not?  Everyone else does.

> I really have to build everything from source. Couldn't I just use
> xgcc to build a suitable target libc?

Yes, but the easiest way to do this by far is to build a GCC with
existing binaries and headers, then use that compiler to compile a new
libc, the build the compiler against that.

It is possible to do a full bootstrap of the compiler by building just
the compiler, then building libc, then building the compiler again.
However, it's very tricky because libgcc, the runtime library of gcc,
needs to be built.  Also, you will need kernel headers.

Unless you're trying to make extra work for yourself, there's no point
doing it the hard way.

Andrew.


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