From owner-freebsd-current@FreeBSD.ORG Fri Nov 9 17:01:49 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE4ECA96; Fri, 9 Nov 2012 17:01:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8678D8FC08; Fri, 9 Nov 2012 17:01:49 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 307B65C59; Fri, 9 Nov 2012 18:01:48 +0100 (CET) Message-ID: <509D36FF.3000409@FreeBSD.org> Date: Fri, 09 Nov 2012 18:01:51 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Roman Divacky Subject: Re: clang and static linking? References: <20121108231349.GA79485@troutmask.apl.washington.edu> <20121108234932.GA56820@troutmask.apl.washington.edu> <20121109120012.GB73505@kib.kiev.ua> <20121109164304.GA61011@troutmask.apl.washington.edu> <20121109164541.GA34499@freebsd.org> In-Reply-To: <20121109164541.GA34499@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-current@freebsd.org, Steve Kargl X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 09 Nov 2012 17:01:49 -0000 On 2012-11-09 17:45, Roman Divacky wrote: > On Fri, Nov 09, 2012 at 08:43:04AM -0800, Steve Kargl wrote: ... ... >> I'll try this shortly. Does this mean that we need to build >> all *.a libraries where a weak reference may occur with this >> switch? > > No, this has nothing to do with llvm integrated asm. > > So far it looks like gcc always inline "isnan" even at O0 while > clang does not. We are trying to figure out the solution. No, it is not related to the optimization level. It looks like isnan() is a builtin for gcc, but not for clang. The isnan() macro expands to a isnan() call for a few of libm's objects: s_fdim.o s_csqrt.o e_scalb.o > Maybe use __builtin_isnan instead of isnan in the isnan macro expansion? Either that, or if people prefer to use libc's isnan() implementation, make sure gcc also calls it instead.