From owner-freebsd-current@FreeBSD.ORG Sat Nov 10 21:59:17 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 AE4B1D01 for ; Sat, 10 Nov 2012 21:59:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 623268FC0A for ; Sat, 10 Nov 2012 21:59:17 +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 52A895C59; Sat, 10 Nov 2012 22:59:16 +0100 (CET) Message-ID: <509ECE39.8020006@FreeBSD.org> Date: Sat, 10 Nov 2012 22:59:21 +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: Jilles Tjoelker Subject: Re: clang and static linking? References: <20121108231349.GA79485@troutmask.apl.washington.edu> <509D4548.7030806@FreeBSD.org> <20121109182810.GA61338@troutmask.apl.washington.edu> <509D5BC3.9020704@FreeBSD.org> <509D90EC.5040302@FreeBSD.org> <509DA0E4.9060906@FreeBSD.org> <20121110213942.GA67444@stack.nl> In-Reply-To: <20121110213942.GA67444@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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: Sat, 10 Nov 2012 21:59:17 -0000 On 2012-11-10 22:39, Jilles Tjoelker wrote: > On Sat, Nov 10, 2012 at 01:33:40AM +0100, Dimitry Andric wrote: ... >> - Only define isnan, isnanf, __isnan and __isnanf in libc.so, not in >> libc.a and libc_p.a. > > OK, but please add a comment about this. Where? In libc or libm? >> - Define isnan in libm.a and libm_p.a, not in libm.so. I don't think >> there is a need to define __isnan in the .a files, so I left that out. > > Removing symbols from a .so causes subtle ABI breakage and is not needed > for fixing static linking. I didn't remove symbols from any .so. There was no isnan in libm.so before my commit. I only added it to the static libraries. > More concretely, dlsym of isnan on libm.so will stop working and a > different version of isnan will be chosen if the search list is libm.so, > libother.so, libc.so and libother.so contains another isnan. As I said, there was no isnan in libm.so, so this does not matter.