Re: Standardized instructions for cross-compiling toolchain?

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

 



On 05/05/2016 04:25 PM, Pip Cet wrote:
> On 5/4/16, Andrew Haley <aph@xxxxxxxxxx> wrote:
>> On 05/04/2016 05:12 PM, Michael Habibi wrote:
>>
>>> However, my question is more general than that. Are there some
>>> widely-used, accepted steps for building a cross-compiling
>>> toolchain with gcc? I noticed that crosstool-ng does a 3 stage
>>> build, where it builds an initial gcc for libc start files, then
>>> rebuilds gcc for libc, then rebuilds gcc yet again with
>>> libc. Other blogs suggest that two stages are enough. I settled on
>>> doing a 2 stage build. I think my steps are fine, but I think some
>>> of my configure options may need help (prefix vs sysroot vs
>>> prefix+target, etc). But every set of instructions I look at are
>>> different, and it seems no two blog posts, pdfs, wikis have landed
>>> on the same procedure.


>>
>> That's the hard way.  The easy way is to grab the root filesystem from
>> your target machine and configure --with-sysroot=<target filesystem>.
>>
>> You really don't have to build libc for your target, and if your
>> target already exists and has a libc you should not do so.
> 
> But what if it doesn't? As long as the ABI hasn't been finalized, it
> seems to me the only way to move forward is to rebuild gcc, glibc, and
> binutils in lockstep.

Then you need a really big hammer like crosstool.  But almost everyone
wanting a cross-compiler is not in this position.  There are not very
many people developing a new ABI.  Sure, you exist, I get that.

But for someone simply asking for a way to build a cross-compiling
toolchain, my answer is far more likely to be appropriate.

Andrew.



[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