This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Standardized instructions for cross-compiling toolchain?
- From: Michael Habibi <mikehabibi at gmail dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 4 May 2016 12:46:44 -0500
- Subject: Re: Standardized instructions for cross-compiling toolchain?
- Authentication-results: sourceware.org; auth=none
- References: <CAOsp8o-fVfAjgez9ttRw0+ckm+MKOomAXnwURcGmCV+AsMX=oA at mail dot gmail dot com> <572A2247 dot 2020003 at redhat dot com> <CAOsp8o-qYO95SGj+mNsqVhak8gU4ECo8UMhByd+fyeN+iGJrJw at mail dot gmail dot com> <572A2747 dot 7020105 at redhat dot com> <CAOsp8o8rFi88Azs5QOUe-1KvjB0xrjfGYHf5T6Z09-0riQdPNg at mail dot gmail dot com> <572A3403 dot 4070502 at redhat dot com>
I think the reason we went with crosstool-ng in the past is that we
are using a custom built distribution based on a vanilla kernel and
some various open source/IP added on top. Over time, we have needed to
upgrade gcc/glibc to pick up changes/CVEs, etc. Given that, I don't
think we can simply leverage the target files of another available
distribution and expect it to plug into ours cleanly for the purposes
of rebuilding gcc. For example, I could go grab the target files for
another distribution, e.g. Ubuntu or Red Hat or similar, but they
probably have dependencies that I don't think we can safely meet, like
being built with minimum kernel versions that we do not have. Suffice
to say our current state of affairs need improving, but those are more
long-term goals.
I think I'm going to have to dig into this a bit more, as the more I
think about it, the more I think we are stuck continuing to build our
own toolchains the hard way. Appreciate your help though.
On Wed, May 4, 2016 at 12:40 PM, Andrew Haley <aph@redhat.com> wrote:
> On 05/04/2016 06:36 PM, Michael Habibi wrote:
>> Thanks again. I will look into using a prebuilt libc. If I were to do
>> those steps, do I only need to do a single gcc build with the sysroot
>> pointing to the root filesystem + new libc libraries? Or is there any
>> special bootstrapping or anything I would need to do?
>
> You want the target libraries and the target headers. Apart from
> that it should just work. Of course, there are always some
> exceptions.
>
> I often just mount an image of the entire target filesystem and use
> that. Sure, that's excessive, but at least you know there is
> nothing missing.
>
> Andrew.
>