Building math-vector-fortran.h in glibc

Joseph Myers joseph@codesourcery.com
Fri Jan 18 21:15:00 GMT 2019


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



More information about the Libc-alpha mailing list