Re: building native cross compiler

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

 



Michael Zintakis <michael.zintakis@xxxxxxxxxxxxxx> writes:

> 1. Does that mean that I should follow the steps in the previous
> section ("Building a native compiler"), use the 3-stage bootstrapping
> and after this use the resulting compiler to build another GCC cross
> compiler (including the appropriate toolchain) for the 3 architectures
> I am interested in and use this compiler to build my software?

Yes.  Actually most people just skip the step of building the native
compiler, and just use the native compiler they have installed anyhow.
That will normally work fine.

> 2.  I am also assuming that the native GCC compiler which builds the
> native cross-compiler needs to be for the host environment (x86_64) or
> have I got this wrong?

That is correct.

> 3. If that is the case what steps should I use to build the GCC
> compiler for the target image architectures (powerpc and i586/i686)?

Here you are building a cross compiler.  I'm not sure what you are
asking, exactly.  You use --target when you run configure as described
in the documentation.

> 4. Further in that section ("Building a cross compiler") there is
> reference in it which advices that after building the native compiler
> I should configure the cross compiler and then issue 'make' which will
> automatically build the 'host' tools (host as in the 'host'
> architecture?!) necessary to build the compiler as well as the
> target' tools for use of the compiler (again, I assume target as in
> the 'target' architectures I am interested in), then build the
> compiler itself (single-stage only) and "Build runtime libraries using
> the compiler from the previous step". That last bit isn't completely
> clear to me - what previous step?

You build the runtime libraries using the cross-compiler.

> 5. I assume at the end of this process I will end up with my native
> cross compiler which I could then use to build my software. Do I need
> to do anything else?

The words "native cross compiler" don't mean anything to me.  I would
say that you have a cross-compiler which runs on your build system.

> 6. Also, later in that section I am advised that for building the
> binutils (which I would need to anyway!) I need to use the same --host
> and --target that are used for configuring GCC, but which one - the
> native cross-compiling GCC or the one that helped build it?

The cross-compiler.

It may help you to glance at
    http://www.airs.com/ian/configure/configure_5.html#SEC29
to understand the terminology we use.

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