Clang buildworld failure due to multiple definitions of __isnanf

Benjamin Kaduk kaduk at MIT.EDU
Tue Jun 28 04:34:29 UTC 2011


On Mon, 27 Jun 2011, Eric McCorkle wrote:

> make.conf:
> CPUTYPE?=core2
> .if !defined(CC) || ${CC} == "cc"
> CC=clang
> CFLAGS=-Qunused-arguments
> .endif
> .if !defined(CXX) || ${CXX} == "c++"
> CXX=clang++
> .endif
> NO_WERROR=
> WERROR=
> NO_FSCHG=
> PERL_VERSION=5.12.3
>
> Just noticed, the CFLAGS would disable optimization, which would explain why 
> no one else seems to see this.  Still, I think the underlying issue warrants 
> investigation.

I seem to recall that our gcc-4.2 with -O0 is known to be buggy -- 
certainly I just tripped over a panic in a third-party kernel module build 
using bsd.kmod.mk with -O0 that was fixed by compiling the object in 
question with -O.
It is not terribly easy to search for, but my archives find at least 
http://lists.freebsd.org/pipermail/freebsd-current/2007-August/076028.html

I would try with -O1 and confirm that your issues go away, and not spend 
time on the core issue if it proves to be a gcc bug.

Unfortunately, we are stuck with an old gcc in base ... though I have yet 
to see if clang -O0 has issues with my module.

-Ben Kaduk


More information about the freebsd-current mailing list