On Fri, 30 Nov 2012, Richard Biener wrote: > If you want to split TARGET_C99_FUNCTIONS then split it properly, > don't add TARGET_HAS_BIONIC to the selection. > > Joseph may provide some guidance here.
My suggested interface would be a target hook such as targetm.libc_has_function, taking two arguments, one of which is an enum value describing the general class of function (e.g. function_c99_misc, function_c99_math_complex, function_gnu) and the other of which is a string with the exact function name. This could replace both the target macros TARGET_C99_FUNCTIONS and TARGET_HAS_SINCOS. I think the default version of the hook should be that all C99 functions are present, but not sincos, though that requires some care in the conversion to keep the settings for all systems the same, since the present default for TARGET_C99_FUNCTIONS is 0. There would then be an always-true version of the hook for non-Linux glibc systems, and one that checks which C library is in use for Linux systems that might or might not be using glibc; this last one is where the Bionic check would go. (Given this is mainly about the target OS rather than the target CPU architecture, I guess the macro choosing a hook implementation would get defined in .h files rather than directly in <arch>.c.) -- Joseph S. Myers jos...@codesourcery.com