Specific Linux syscalls for glibc API

Joseph Myers joseph@codesourcery.com
Wed Nov 18 15:06:00 GMT 2015


On Wed, 18 Nov 2015, Pedro Alves wrote:

> In general, I wonder whether helping the cross-compilation use case (of 
> portable programs, not of glibc itself) should be considered in 
> determining the guidelines of what/when to wrap and provide in the glibc 
> API (not getrandom in particular, but in general).  That is, if some 
> entry point is always provided in the glibc API that may or may not fail 
> with ENOSYS depending on port, then compile/link autoconf-style checks 
> are no longer sufficient to determine whether a function is available, 
> while run-time checks obviously don't work when cross compiling.
> 
> Is it already the case that functions in the glibc API may be exported 
> on all ports but then fail with ENOSYS on some?

If a function is a pure stub, then gnu/stubs.h will indicate this and 
autoconf knows about that.  If it may or may not fail at runtime depending 
on kernel support, then, yes, applications need to check at runtime 
themselves.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list