From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 26 18:18:39 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A12411065670 for ; Thu, 26 Feb 2009 18:18:39 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 5C08A8FC1D for ; Thu, 26 Feb 2009 18:18:39 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n1QIIGPo015222; Thu, 26 Feb 2009 13:18:16 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Thu, 26 Feb 2009 13:18:17 -0500 (EST) Date: Thu, 26 Feb 2009 13:18:16 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Ed Schouten In-Reply-To: <20090226180756.GX19161@hoeg.nl> Message-ID: References: <20090226180756.GX19161@hoeg.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Renaming all symbols in libmp(3) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 18:18:40 -0000 On Thu, 26 Feb 2009, Ed Schouten wrote: > Hello all, > > As you may have read some days ago, work has started to make the FreeBSD > base system compile better with clang, the BSD licensed C compiler from > the LLVM project. > > One of the reasons why we can't compile the base system yet, is because > some applications in the base system (keyserv, newkey, chkey, libtelnet) > won't compile, because a library they depend (libmp)on has a function > called pow(). By default, LLVM has a built-in prototype of pow(), > similar to GCC. Unlike GCC, LLVM raises a compiler error by default. The > manual page also mentions this issue. > > After some talking on IRC, I think the best solution would be to rename > all functions in libmp. Even though this may sound very awful at first, > it seems the competition has done this as well: > > http://docs.sun.com/app/docs/doc/819-2246/mp-3mp?a=view > > I'm not saying that if the Solaris developers jump off a cliff, we > should do the same, but looking at the amount of applications that > depend on libmp (almost none), I think it's the only definitive > solution. > > So this is the patch I propose to commit to SVN one of these days: > > http://80386.nl/pub/mp.diff > > Because this also reduces some warnings when compiling stuff with GCC, > I've increased WARNS in various Makefiles. I've also increased the > SHLIB_MAJOR and __FreeBSD_version. Why don't you add symbol versioning to libmp, so that old binaries will still work, but new ones will get the new symbols by default. Hmm, will that work without bumping SHLIB_MAJOR? You might want to play around with it and see. -- DE