This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Improving math function wrappers


On Tue, 4 Apr 2017, Szabolcs Nagy wrote:

> > Compilers for non-C languages without the concept of these functions 
> > setting errno can of course default to -fno-math-errno by default (and 
> > built-in no-errno functions that can be used with -fmath-errno is 
> > otherwise enabled would also be desirable for fma, sqrt, etc.).
> 
> then fortran can only use no-errno functions
> when those can be inlined, since extern calls
> use the standard libc symbols which set errno
> in glibc.

No, you should think of the implementation as a whole.  The Fortran 
compiler can know about what functions outside the standard are available 
in the C libm, and so generate calls to such nonstandard functions where 
appropriate.  That can either be hardcoded information about functions in 
particular glibc versions, or a system (e.g. file in the sysroot read by 
the compiler) for glibc to communicate such information to the Fortran 
compiler.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]