On Mon, Feb 1, 2016 at 7:45 PM, Jeff Law <l...@redhat.com> wrote:
> On 02/01/2016 12:07 PM, Bin.Cheng wrote:
>>
>> On Mon, Feb 1, 2016 at 6:08 PM, Andreas Schwab <sch...@linux-m68k.org>
>> wrote:
>>>
>>> "Bin.Cheng" <amker.ch...@gmail.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.
Hi,
I still don't quite follow this method.  If I pop up chroot
environment with new glibc, it's still possible that the new glibc
isn't compatible with the default gcc in chroot.  Won't this a
chicken-egg problem because we want to build our gcc against new glibc
in the first place?

Thanks,
bin
>
> I'm sure there's a way to do this with containers too.
>
> jeff

Reply via email to