Date: Tue, 29 Oct 2019 21:54:02 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 241550] Base Clang can't compile trivial CUDA programs: error: no matching function for call to '__isnan' Message-ID: <bug-241550-29464-SWnsiJkrwO@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-241550-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-241550-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241550 --- Comment #5 from Dimitry Andric <dim@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 '__isn= an' __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 '__isn= anf' __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 th= at 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. :) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241550-29464-SWnsiJkrwO>