Re: Bootstrapping new architectures with C++

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

 



On Mon, Mar 18, 2013 at 6:33 AM, Sam Thursfield
<sam.thursfield@xxxxxxxxxxxxxxx> wrote:
>
> Could someone explain how GCC can be cross-built for new architectures now
> that it requires C++ to build? It seems to be that there is the following
> dependency loop:
>
>   - Building libstdc++ for target requires a libc for the target
>   - Building libc for target requires a gcc for target
>   - Building gcc for target requires at least a g++ that cross-compiles
>   - The cross-g++ for the target requires a libstdc++ built for the target
>
> For architectures that GCC is already built for, I hear that this will be
> solved by ensuring GCC version N can be built by version N-1. But how will
> this work for a new architecture, which doesn't yet have a GCC built for it?

Normally compilers for new architectures are initially built as
cross-compilers.  So the procedure is:

* Build cross-GCC for target using host libstdc++
* Use cross-GCC to build libc for target
* Use cross-GCC to build libstdc++ for target
* Use cross-GCC, libc, libstdc++ to build native GCC for target

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux