[Bug 241550] Base Clang can't compile trivial CUDA programs: error: no matching function for call to '__isnan'
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Oct 29 21:54:03 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241550
--- Comment #5 from Dimitry Andric <dim at FreeBSD.org> ---
(In reply to Dimitry Andric from comment #4)
Hmm, and that obviously doesn't build:
--- isnan.pico ---
/home/dim/src/head/lib/libc/gen/isnan.c:50:1: error: redefinition of '__isnan'
__isnan(double d)
^
/home/dim/src/head/lib/msun/src/math.h:197:1: note: previous definition is here
__isnan(__const double __x)
^
/home/dim/src/head/lib/libc/gen/isnan.c:59:1: error: redefinition of '__isnanf'
__isnanf(float f)
^
/home/dim/src/head/lib/msun/src/math.h:204:1: note: previous definition is here
__isnanf(__const float __x)
^
2 errors generated.
I'm unsure what a good way is to work around it...
Maybe it's best to just add wrapper __isnan() and __isnanf() to the CUDA
specific headers, since they are only used in that particular case. But that
would only work for our own copy of clang, not for the ports version.
Or use some special hack to not define __isnan() and __isnanf() in math.h if
libc's isnan.c is compiled. :)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list