This is the mail archive of the
mailing list for the GCC project.
Re: Help about how to bootstrap gcc with local version glibc other than system one
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 2 Feb 2016 11:41:48 +0000
- Subject: Re: Help about how to bootstrap gcc with local version glibc other than system one
- Authentication-results: sourceware.org; auth=none
- References: <CAHFci2-MGvGREn85cu91U_KT0bqsgMuCWsfON42u5ENJaiaH4w at mail dot gmail dot com> <87egcwxpzi dot fsf at linux-m68k dot org> <CAHFci2_ZLQeZUqDYknkL7Gey7vxy6asDvn=E+v3Fu58V1_CaYQ at mail dot gmail dot com> <56AFB5F2 dot 10007 at redhat dot com>
On Mon, Feb 1, 2016 at 7:45 PM, Jeff Law <email@example.com> wrote:
> On 02/01/2016 12:07 PM, Bin.Cheng wrote:
>> On Mon, Feb 1, 2016 at 6:08 PM, Andreas Schwab <firstname.lastname@example.org>
>>> "Bin.Cheng" <email@example.com> writes:
>>>> Seems to me Andrew was right in comment of PR69559, that we simply
>>>> couldn't bootstrap GCC with sysroot.
>>> The main use of sysroot is to build a cross compiler, which you cannot
>>> bootstrap anyway.
>>>> My question here is: If this is the case, how should I bootstrap a gcc
>>>> against local version glibc, rather than the system one? Is chroot
>>>> the only way to do that?
>>> Yes, building in a chroot or a VM is the best way to do it. For
>>> example, that's how the openSUSE Build Service works.
>> Hi Andreas,
>> Thanks very much for helping. I will try to do it in chroot.
> Definitely what I'd recommend as well.
> We do this regularly with something called "mock" on Fedora. I'm sure SuSE,
> Debian, Ubuntu, etc have an equivalent.
> Essentially they create a chroot, populate it with build dependencies
> extracted from the source package, then build within the chroot. You can
> arrange to get a different glibc during instantiation of the chroot, or
> upgrade it after the chroot is fully instantiated.
> I'm sure there's a way to do this with containers too.
Thanks very much. I realized bootstrap GCC against new local glibc is
mainly for testing purpose, because that gcc cannot be distributed
alone to system with old glibc. The old glibc might don't have new
symbols supported in new glibc. Or, if I want to populate whole
system from scratch.