public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: libc-alpha@sourceware.org, joseph@codesourcery.com
Cc: Palmer Dabbelt <palmerdabbelt@google.com>
Subject: Re: RISC-V 64bit and 32bit binaries on the same system
Date: Wed, 09 Sep 2020 22:49:51 +0300	[thread overview]
Message-ID: <5977652.RfpFWEtPUA@farino> (raw)
In-Reply-To: <mhng-07bac7fe-a215-4a1b-9d4f-4672cdfd7482@palmerdabbelt-glaptop1>

[-- Attachment #1: Type: text/plain, Size: 2128 bytes --]

> > (And it looks like a comparatively large amount of work for a situation
> > that is right now fairly hypothetical, unless you try silly things with
> > qemu like me).
> 
> It'd be great to bootstrap all the multilib stuff, but it's just a matter of
> priorities.  It's a fairly large amount of work to put this all together,
> but it shouldn't be all that hard to add writable XLEN to QEMU which would
> allow Linux to spin up rv32 processes.  There'd be a big pile of work left
> at that point, though...

Well it kinda-works half in a Gentoo qemu-user chroot right now, which is of 
course not the most useful production environment. :)

What looks good in my experiments:
* building and installing gcc with all 4 ABI and multilib paths
* building and installing glibc with all 4 ABI and multilib paths

Then, the Gentoo multilib system still works *if* I order the ld.so search 
paths right (all the executables are lp64d, so that comes first, and the 
ilp32[d] libs are ignored). All four ld.so variants are installed.

In principle, *if* ld.so were to ignore wrong elfclass (with all changes that 
this requires), a mixed multilib Gentoo install could work more or less out of 
the box. We already use /usr/lib64/lp64[d], and I hook into the same path 
adjustment mechanisms and multi-abi builds we have made for x86-64/i686 and 
others.

> > So maybe the multilib defaults of gcc should be changed?
> 
> Either way, that seems reasonable to me.  If we ever implement it we can
> always add the multilibs back, but it doesn't seem reasonable to default to
> something broken.  I bet you guys are the first to take a shot at the Linux
> multilib stuff, so I anticipate a bunch of stuff will be broken.
> 
> Do you want to send a GCC patch, or do you want me to?

I agree; we can always slowly prepare the support anyway so it's ready once 
there is hardware.

It's probably better if the gcc patch comes from you ("more official").

Best, 
Andreas

-- 
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 --]

      reply	other threads:[~2020-09-09 19:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 13:32 Andreas K. Hüttel
2020-09-07 16:56 ` Joseph Myers
2020-09-07 17:05   ` Andreas K. Hüttel
2020-09-09  4:22     ` Palmer Dabbelt
2020-09-09 19:49       ` Andreas K. Hüttel [this message]

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=5977652.RfpFWEtPUA@farino \
    --to=dilfridge@gentoo.org \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=palmerdabbelt@google.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).