Date: Tue, 28 Jun 2011 12:37:38 -0700 From: Garrett Cooper <yanegomi@gmail.com> To: Eric McCorkle <eric@shadowsun.net> Cc: freebsd-current@freebsd.org Subject: Re: Clang buildworld failure due to multiple definitions of __isnanf Message-ID: <BANLkTikmjHS7vme4z0ODMv6daA_A8%2B8j=A@mail.gmail.com> In-Reply-To: <4E08A8DB.2020805@shadowsun.net> References: <4E07EBA2.70500@shadowsun.net> <4E08778D.2050302@FreeBSD.org> <4E08A8DB.2020805@shadowsun.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 27, 2011 at 8:59 AM, Eric McCorkle <eric@shadowsun.net> wrote: > On 6/27/11 8:29 AM, Dimitry Andric wrote: >> >> On 2011-06-27 04:32, Eric McCorkle wrote: >>> >>> I've both seen reports and experienced make buildworld with clang >>> failing in usr.bin/xlint/lint1 (really, make kernel-toolchain is what >>> fails), because lint1 is statically linked, and there is a definition o= f >>> __isnanf in both libc and libm. GCC, on the other hand, builds just fin= e. >> >> ... >> >> I have never seen this failure, and neither does the clang buildbot, so >> maybe there is something in your build environment causing this problem? >> Can you please post: >> >> - Your build architecture (e.g. i386 or amd64) >> - Your /etc/make.conf and /etc/src.conf, if applicable >> - Any build-related environment variables (WITH_FOO, WITHOUT_FOO, >> CFLAGS, etc) >> > > Sorry. =A0It's an amd64 system, 9-CURRENT, last updated on friday. > > src.conf: > LOADER_ZFS_SUPPORT=3D"YES" > > make.conf: > CPUTYPE?=3Dcore2 > .if !defined(CC) || ${CC} =3D=3D "cc" > CC=3Dclang > CFLAGS=3D-Qunused-arguments > .endif > .if !defined(CXX) || ${CXX} =3D=3D "c++" > CXX=3Dclang++ > .endif > NO_WERROR=3D > WERROR=3D > NO_FSCHG=3D > PERL_VERSION=3D5.12.3 > > Just noticed, the CFLAGS would disable optimization, which would explain = why > no one else seems to see this. =A0Still, I think the underlying issue war= rants > investigation. Two things are wrong here: 1. You should use CC?=3D, CXX?=3D, etc in order to properly crossbuild (as Warner pointed out to me in another thread). 2. You should use CFLAGS+=3D, CXXFLAGS+=3D, otherwise you're going to obliterate any predefined CFLAGS, CXXFLAGS, etc. My guess is that if you use +=3D instead, things will actually work. HTH, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikmjHS7vme4z0ODMv6daA_A8%2B8j=A>