From owner-freebsd-current@FreeBSD.ORG Tue Jun 28 19:37:40 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2280D1065672 for ; Tue, 28 Jun 2011 19:37:40 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D12498FC17 for ; Tue, 28 Jun 2011 19:37:39 +0000 (UTC) Received: by vxg33 with SMTP id 33so573949vxg.13 for ; Tue, 28 Jun 2011 12:37:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=w9qUD4KI6YVJY5puGuA3c0FYKEvsVbcsEQcuaReFORY=; b=b59OYxOqvy9j/j8/EO7KLaebxVhcitSoH6fRW9PJYMBHTpfmSpxRAZ5EUJDDPNQgdr Xw3ZhlWVW59T4dFut0Cz9FnzjtgJMtIBkycUxGxkveANWdyPxCKiM+ZiBYMi5dSB0fz5 4Lk38zusHVRuTQd35k7B6szU8cEZnOgu8WTUw= MIME-Version: 1.0 Received: by 10.220.7.79 with SMTP id c15mr1977296vcc.3.1309289858809; Tue, 28 Jun 2011 12:37:38 -0700 (PDT) Received: by 10.220.92.201 with HTTP; Tue, 28 Jun 2011 12:37:38 -0700 (PDT) In-Reply-To: <4E08A8DB.2020805@shadowsun.net> References: <4E07EBA2.70500@shadowsun.net> <4E08778D.2050302@FreeBSD.org> <4E08A8DB.2020805@shadowsun.net> Date: Tue, 28 Jun 2011 12:37:38 -0700 Message-ID: From: Garrett Cooper To: Eric McCorkle Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: Clang buildworld failure due to multiple definitions of __isnanf X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2011 19:37:40 -0000 On Mon, Jun 27, 2011 at 8:59 AM, Eric McCorkle 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