From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2094 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: feature request: flag to disable math library build Date: Sat, 13 Oct 2012 08:26:42 -0400 Message-ID: <20121013122642.GI254@brightrain.aerifal.cx> References: <5077024E.6080104@barfooze.de> <20121011181709.GK24157@port70.net> <20121011193738.GL24157@port70.net> <20121011232858.GA254@brightrain.aerifal.cx> <20121013002349.540286e6.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1350131727 6757 80.91.229.3 (13 Oct 2012 12:35:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Oct 2012 12:35:27 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2095-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 13 14:35:34 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TN0wG-00074y-In for gllmg-musl@plane.gmane.org; Sat, 13 Oct 2012 14:35:32 +0200 Original-Received: (qmail 23850 invoked by uid 550); 13 Oct 2012 12:35:25 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 23835 invoked from network); 13 Oct 2012 12:35:24 -0000 Content-Disposition: inline In-Reply-To: <20121013002349.540286e6.idunham@lavabit.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2094 Archived-At: On Sat, Oct 13, 2012 at 12:23:49AM -0700, Isaac Dunham wrote: > On Thu, 11 Oct 2012 19:28:58 -0400 > Rich Felker wrote: > > > On Thu, Oct 11, 2012 at 09:37:38PM +0200, Szabolcs Nagy wrote: > > > these are the math functions used by other parts > > > of libc (mostly float scan and print): > > > > > > M = \ > > > > so you need > > > > > > SRCS := $(SRCS) $(M:%=src/math/%.c) > > > > > > (not tested) > > > > Note that this breaks if any of the above functions ever depend on > > other math functions or internal math modules, not to mention if the > > set of math functions used by the other part of the library ever > > changes. I'm generally opposed to this kind of feature switching > > because it has huge maintenance cost keeping track of all possible > > configurations and ensuring none of them are broken. > > I'd tend to consider src/math to be core components. > And IIRC, src/complex built the last time I tried CVS pcc (but I > could be misremembering!) Nice to hear - I hope that's true! > However, C11 makes complex numbers optional, and there's currently > no dependance on src/complex/ - would it make sense to allow > /configure --disable-complex > (via the filter-out rule)? > What percent of the build time is that? Should be very small. These functions contain basically no heavy computation, only a few things for dealing with situations where the overflow/underflow cases need special handling. There are plenty of other things in musl that are not required by the base standards, like GNU extensions, all of the XSI option, and various POSIX feature groups like spawn, but they're not made optional, because it increases complexity and has almost no benefits. Rich