From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1758 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Best bikeshed ever (feature test macros) Date: Sat, 25 Aug 2012 08:32:15 -0400 Message-ID: <20120825123215.GL27715@brightrain.aerifal.cx> References: <20120824214138.GA17792@brightrain.aerifal.cx> <20120825153556.20782684@sibserver.ru> 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 1345897837 19377 80.91.229.3 (25 Aug 2012 12:30:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2012 12:30:37 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1759-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 25 14:30:38 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 1T5FVe-000618-4t for gllmg-musl@plane.gmane.org; Sat, 25 Aug 2012 14:30:38 +0200 Original-Received: (qmail 25647 invoked by uid 550); 25 Aug 2012 12:30:35 -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 25636 invoked from network); 25 Aug 2012 12:30:35 -0000 Content-Disposition: inline In-Reply-To: <20120825153556.20782684@sibserver.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1758 Archived-At: On Sat, Aug 25, 2012 at 03:35:56PM +0800, orc wrote: > Will exposing everything by default enlarge program size by including > unneeded symbols? The only way this could happen is if the newly exposed portions of the headers include static inline functions and the compiler decides to generate code for them even when they're not used. The compiler could also increase the size of _debugging_ tables in the output to include the unused types, etc. but not the size of actual code. > From my point of view, appending -D_GNU_SOURCE everytime when you > install software on system is painful, but it can be "hidden", for Actually it can't; this is the main problem with the current approach. Unconditionally adding -D_GNU_SOURCE to CFLAGS for all programs "fixes" most programs that should be using it themselves, but breaks a small but nonzero number of fully-correct programs that are using feature test macros properly to _avoid_ having their namespace polluted by nonstandard symbols that conflict with their own use of the corresponding names. Thus, before you have build a package, you have to know whether it makes use of feature test macros on its own. Rich