This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Building math-vector-fortran.h in glibc
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Steve Ellcey <sellcey at marvell dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "mliska at suse dot cz" <mliska at suse dot cz>
- Date: Fri, 18 Jan 2019 21:14:54 +0000
- Subject: Re: Building math-vector-fortran.h in glibc
- References: <b73850db18de6197a5e3ae6c963ef13d0ee9aa83.camel@marvell.com>
On Fri, 18 Jan 2019, Steve Ellcey wrote:
> The other thought I had was, instead of scanning math-vector.h,
> have the script preprocess math.h itself and then look for simd
> attributes after preprocessing. I think that would make the scanner
> more complex though.
I think that's the right approach to avoid depending on
architecture-specific header contents.
The x86 header has an __x86_64__ because there's no libmvec support for
32-bit, but in general you could have support for libmvec for multiple
ABIs for an architecture, but with different sets of functions, in which
case you need to generate the right header contents for each ABI, which
preprocessing will give you.
Note also that (subject to any changes following Jakub's comments) you
need to put the header in the right, multilib-specific directory in which
the compiler will search for it - that is, including the output of the
compiler with -print-multi-directory (with the present search logic).
--
Joseph S. Myers
joseph@codesourcery.com