From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-user@lists.gentoo.org
Cc: Thomas Mueller <mueller6724@twc.com>
Subject: Re: [gentoo-user] Gentoo chroot with old glibc
Date: Sat, 09 Jan 2021 01:37:14 +0200 [thread overview]
Message-ID: <5231675.rdbgypaU67@farino> (raw)
In-Reply-To: <20210104115748.50A5EE0930@pigeon.gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2075 bytes --]
Am Montag, 4. Januar 2021, 13:57:37 EET schrieb Thomas Mueller:
> > > That's what I did: I found a 2017 stage3 with a still older glibc and
> > > managed to upgrade to a 2020 gentoo while masking the last glibc
> > > versions. That was tricky because I had to git-checkout intermediate
> > > versions of the portage tree in order to deal with the EAPI changes but
> > > I have a working chroot now. Thanks.
> >
> > That's the easy way to do it, yes.
> >
> > The hard way is to treat this as a cross-compilation problem and bootstrap
> > your own stages from scratch. Instructions would be a bit longer...
> >
> > Andreas K. Hüttel
>
> I have looked through crossdev. Is that what it would take to cross-compile
> and bootstrap stages from scratch?
>
> Could that be done from (instead of an old glibc) musl, uClibc, or FreeBSD
> or NetBSD?
In principle yes, but every experimental piece can add more problems.
It's probably best to start with a base that is as boring as possible.
What crossdev does is (simplified)
* "create" (as symlinks) ebuilds for cross-compiler, cross-binutils, and
target glibc
* build cross-compiler, cross-binutils, and target glibc
* installs a wrapper for emerge that uses these
For example, you end up on an amd64 system with an additional directory /usr/
riscv64-unknown-linux-gnu that contains
* a gcc that runs on amd64 (CBUILD) but generates code for riscv64 (CTARGET)
* a binutils that runs on amd64 but works with files for riscv64
* a glibc for riscv64
Then, using commands like
riscv64-unknown-linux-gnu-emerge -av @system
you can build in /usr/riscv64-unknown-linux-gnu pieces of the target system.
This works only in a very limited way, since many upstream build systems do
not support cross-compiling. However, with some patience you can get to the
point where the directory can be tarred up and used as a chroot on the target
architecture.
--
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, qa, toolchain, base-system, perl, libreoffice)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
next prev parent reply other threads:[~2021-01-08 23:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 21:19 [gentoo-user] Gentoo chroot with old glibc Hervé Guillemet
2020-06-21 17:06 ` Michael
2020-06-21 19:43 ` Hervé Guillemet
2020-06-21 20:03 ` Michael
2020-06-21 22:52 ` Hervé Guillemet
2020-06-30 8:26 ` Andreas K. Huettel
2020-06-30 16:29 ` Laurence Perkins
2020-07-01 1:40 ` [gentoo-user] Grub: for the love of almighty Zardoz the magniicent Alan Grimes
2020-07-01 8:15 ` Neil Bothwick
2020-07-01 8:45 ` Michael
2020-07-02 4:20 ` Alan Grimes
2020-07-01 1:30 ` [gentoo-user] Gentoo chroot with old glibc Thomas Mueller
[not found] ` <20200701013122.CE9C8E08AE@pigeon.gentoo.org>
2020-07-01 14:47 ` Andreas K. Huettel
2021-01-04 11:57 ` Thomas Mueller
[not found] ` <20210104115748.50A5EE0930@pigeon.gentoo.org>
2021-01-08 23:37 ` Andreas K. Hüttel [this message]
2020-06-21 21:08 ` Rich Freeman
2020-06-21 22:34 ` Hervé Guillemet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5231675.rdbgypaU67@farino \
--to=dilfridge@gentoo.org \
--cc=gentoo-user@lists.gentoo.org \
--cc=mueller6724@twc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox