From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 13CD33857C59 for ; Wed, 9 Sep 2020 19:50:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13CD33857C59 From: Andreas =?ISO-8859-1?Q?K=2E_H=FCttel?= To: libc-alpha@sourceware.org, joseph@codesourcery.com Cc: Palmer Dabbelt Subject: Re: RISC-V 64bit and 32bit binaries on the same system Date: Wed, 09 Sep 2020 22:49:51 +0300 Message-ID: <5977652.RfpFWEtPUA@farino> Organization: Gentoo Linux In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart35557160.VHbPRQshPE"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2020 19:50:01 -0000 --nextPart35557160.VHbPRQshPE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" > > (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). >=20 > 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 o= f=20 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= =20 paths right (all the executables are lp64d, so that comes first, and the=20 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 th= at=20 this requires), a mixed multilib Gentoo install could work more or less out= of=20 the box. We already use /usr/lib64/lp64[d], and I hook into the same path=20 adjustment mechanisms and multi-abi builds we have made for x86-64/i686 and= =20 others. > > So maybe the multilib defaults of gcc should be changed? >=20 > 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 Lin= ux > multilib stuff, so I anticipate a bunch of stuff will be broken. >=20 > 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= =20 there is hardware. It's probably better if the gcc patch comes from you ("more official"). Best,=20 Andreas =2D-=20 Andreas K. H=FCttel dilfridge@gentoo.org Gentoo Linux developer=20 (council, qa, toolchain, base-system, perl, libreoffice) --nextPart35557160.VHbPRQshPE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEE50NBr50KpJKM5MK59n+4O2olsAAFAl9ZMd9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU3 NDM0MUFGOUQwQUE0OTI4Q0U0QzJCOUY2N0ZCODNCNkEyNUIwMDAACgkQ9n+4O2ol sABz4A/+ITX2+kM6Zt1uvKdwI7Ic67BoB8B09tjnzFx4RQ3kVNoHjTC/58wxDsLM 0ceX03jz2DpZIpV4cltU2MkA6dc0CUGRs7FmRzerK1SmbV5g2zTLtMr1QBBGtJ4N JX5xFxZd18zEAcnUU6JF7NsZeI8JDkkyvXCsx7TguA4hdPx0XkP6/gjLIkwgV0ZT Uak09QTgbPacsJdEYaVUP1zeGl09JUJH7gYtPSUyp0/OS2OoEtIxj/nMqf6bYOSf tuKyMpNt1Tf1DIDt4P/KEzxdD6WUeeb8vr3oW+ssYdPEFMWRbio8L/m7Zd4ysdU6 E2ZpDQ6mfdiAwuAUD9eXFmOgq7wXZPQu2Wg58Q+hepEf4ttts3vgZRxSwjiEjiuq csvWA342f+vHcREqhR6YNaizJKTTHRFH4Px2d5up3wRiUuAwj1MMEwcUTQ3RdweM iElGashrTdasNMmerVb9DGPBnyi4k8oi/6LXbES1HECpkN0nUCcrtpE6a0RnXHgF e7SEmIUldcpafel4v5LOmAf/Gyl3yfyi7XdDksCJjVOG+lhkVsR02u5ZrDEur7Z1 1zxtlZ2Z0oDUdDkZUpk9wwkKKHM+oDu/xyFd7M+szCSRINiiikLIalD8E+UPWY+p vDU+cctTKJBR32Or7q5FCP+KgSZU7hIiNhf1nJHEkPBrmTwNGSU= =1WmR -----END PGP SIGNATURE----- --nextPart35557160.VHbPRQshPE--