This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39570] cabs and cabsf are named differently on NetBSD 5
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Feb 2011 13:26:14 +0000
- Subject: [Bug target/39570] cabs and cabsf are named differently on NetBSD 5
- Auto-submitted: auto-generated
- References: <bug-39570-4@http.gcc.gnu.org/bugzilla/>
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.