This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: RISC-V glibc port v2
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, Andrew Waterman <andrew at sifive dot com>, Darius Rad <darius at bluespec dot com>, <dj at redhat dot com>
- Date: Mon, 1 Jan 2018 01:19:48 +0000
- Subject: Re: RISC-V glibc port v2
- Authentication-results: sourceware.org; auth=none
- References: <mhng-c7e28359-5ed1-4fa0-92a3-263d4a0eb70a@palmer-si-x1c4>
On Mon, 25 Dec 2017, Palmer Dabbelt wrote:
> > Apart from the points I've mentioned in comments on individual patches, as
> > previously noted you need a c++-types.data ABI baseline or baselines. And
> > as previously noted a bits/environments.h header may be appropriate though
> > not required. And you're missing libm-test-ulps / libm-test-ulps-name
> > files.
>
> I don't think we need a bits/environments.h right now, but I think we will
> need one if we're going to support ILP32 on RV64I-based systems. If I
> understand correctly, it's OK to add this file when we add the new ABI?
Do I understand correctly from this that RV64I processors cannot execute
RV32I code (unlike e.g. x86_64 where execution of 32-bit code is always
supported by the processor, or AArch64 where processors may or may not
support execution of AArch32 code)? If so, then indeed
bits/environments.h is not relevant at present.
However, as I understand it you still support simultaneous presence of
libraries for two different ABIs on a single system (hard-float and
soft-float ABIs), with those having separate library directories and
dynamic linker names. Which means there is still some multi-ABI support
that should be included in the port and appears to be missing.
In cases where libraries for multiple ABIs may be present at once, there
should be flags defined in sysdeps/generic/ldconfig.h to allow such
libraries to be distinguished in ld.so.cache. elf/cache.c should include
support for printing a corresponding description for those flags. There
should be a sysdeps ldconfig.h file defining
SYSDEP_KNOWN_INTERPRETER_NAMES with all the supported dynamic linker
names. There should be a sysdeps readelflib.c file that includes code to
identify the flags to associate with a given shared library. There should
be a sysdeps dl-cache.h defining _dl_cache_check_flags and (given that you
use directories other than plain lib) add_system_dir. There should be an
ldd_rewrite_script setting in a sysdeps configure.ac file, pointing to a
sed script that edits ldd so that ldd installed by glibc build for any ABI
is able to work properly for binaries of any other ABI that can execute on
that system.
You have ldconfig.h with SYSDEP_KNOWN_INTERPRETER_NAMES. The other listed
pieces of multi-ABI support appear to be missing in the latest version of
the port.
--
Joseph S. Myers
joseph@codesourcery.com