This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add hidden visibility to internal function prototypes
On Mon, 21 Aug 2017, H.J. Lu wrote:
> > Now, it would be reasonable to build those GMP files again (configured as
> > in-testsuite not in-libc) just for use in those tests. That might be the
> > cleanest approach for avoiding the problem, but it might also run into
> > other problems if building those files as in-testsuite doesn't actually
> > work because they depend on internal details of headers that are disabled
> > for the in-testsuite case.
>
> Why not require and use the real gmp library for those tests?
Requiring additional libraries for the target excessively complicates
testing. GMP is a particular pain in this regard given how it may
sometimes try to choose an ABI that's not the one the compiler defaults
to, or have problems with more unusual ABIs such as get included in glibc
testing.
On the other hand, copying mini-gmp.c and mini-gmp.h from the GMP sources
into glibc, and using those unmodified in the tests, may well be a
reasonable approach if it works: mini-gmp is designed to be copied like
that, and avoids all the complications around ABI choice and assembly
sources. That way you'd avoid additional dependencies on the target. But
we should definitely avoid local changes to mini-gmp; inclusion of
mini-gmp would mean adding it to the list at
https://sourceware.org/glibc/wiki/Regeneration and including it in the
list in scripts/update-copyrights of files that don't get copyright dates
updated because of being imported verbatim from elsewhere.
--
Joseph S. Myers
joseph@codesourcery.com