[Bug target/39570] cabs and cabsf are named differently on NetBSD 5

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Feb 22 13:42:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39570

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cato at df dot lth.se

--- Comment #11 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-22 13:25:53 UTC ---
I just checked
CC the one of the two NetBSD maintainers who has been last active...

 * * *

  CVS_RSH="ssh"  cvs -d "anoncvs@anoncvs.NetBSD.org:/cvsroot" co src/lib/libm/

and libm/compat contains only compat_cabsf and compat_cabs.c, which use a
struct instead of complex. That those are the only math-related changes, one
sees if on greps for __RENAME in
  CVS_RSH="ssh"  cvs -d "anoncvs@anoncvs.NetBSD.org:/cvsroot" co src/include/
i.e. complex.h contains:

#ifndef __LIBM0_SOURCE__
/* avoid conflict with historical cabs(struct complex) */
double cabs(double complex) __RENAME(__c99_cabs);
float cabsf(float complex) __RENAME(__c99_cabsf);
#endif

 * * *

Regarding the patch (cf. comment 3): Darwin has the files darwin.c in
./gcc/config/, which is included via ./gcc/config.gcc's
  tm_p_file="${tm_p_file} darwin-protos.h"
  target_gtfiles="\$(srcdir)/config/darwin.c"
  extra_objs="darwin.o"
One probably needs to do likewise for "*-*-netbsd*)".

In darwin.c, see darwin_patch_builtins and darwin_patch_builtin.

Those are used via SUBTARGET_INIT_BUILTINS in some ./gcc/config/* files.



More information about the Gcc-bugs mailing list