target/89125 - BSD and math functions
commitb6e22db8564827c82108e0b7fa1a84675379c12b
authorSteve Kargl <kargl@gcc.gnu.org>
Mon, 25 Apr 2022 07:23:56 +0000 (25 09:23 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 25 Apr 2022 07:25:33 +0000 (25 09:25 +0200)
tree824fbab4d7dc1df7f6a6bd17c4e8dff74592467d
parent4f77738c3b44cb6b7bfe2a7ef823a5d9d75c0e79
target/89125 - BSD and math functions

Back story: When GCC is configured and built on non-glibc platforms,
it seems very little to no effort is made to enumerate the available
C99 libm functions.  It is all or nothing for C99 libm.  The patch
introduces a new function, used on only FreeBSD, to inform gcc that
it has C99 libm functions (minus a few which clearly GCC does not check
nor test).

2022-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>

PR target/89125
* config/freebsd.h: Define TARGET_LIBC_HAS_FUNCTION to be
bsd_libc_has_function.
* targhooks.cc (bsd_libc_has_function): New function.
Expand the supported math functions to inclue C99 libm.
* targhooks.h (bsd_libc_has_function): New Prototype.
gcc/config/freebsd.h
gcc/targhooks.cc
gcc/targhooks.h