From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1760 Path: news.gmane.org!not-for-mail From: orc Newsgroups: gmane.linux.lib.musl.general Subject: Re: Best bikeshed ever (feature test macros) Date: Sat, 25 Aug 2012 23:29:44 +0800 Message-ID: <20120825232944.21b34f20@sibserver.ru> References: <20120824214138.GA17792@brightrain.aerifal.cx> <20120825153556.20782684@sibserver.ru> <20120825123215.GL27715@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1345908676 31450 80.91.229.3 (25 Aug 2012 15:31:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2012 15:31:16 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1761-gllmg-musl=m.gmane.org@lists.openwall.com Sat Aug 25 17:31:16 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 1T5IKR-0001il-Lh for gllmg-musl@plane.gmane.org; Sat, 25 Aug 2012 17:31:15 +0200 Original-Received: (qmail 28362 invoked by uid 550); 25 Aug 2012 15:31:13 -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 28337 invoked from network); 25 Aug 2012 15:31:09 -0000 In-Reply-To: <20120825123215.GL27715@brightrain.aerifal.cx> X-Mailer: claws-mail Xref: news.gmane.org gmane.linux.lib.musl.general:1760 Archived-At: On Sat, 25 Aug 2012 08:32:15 -0400 Rich Felker wrote: > 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. Then I would recommend the #2 way or even to expose everything by default since there is big number of software with their own incompatible build systems, broken build systems like you said about gcc, but there is still problem with ugly ones which logic uses __GNUC__ and similiar macros (but we can omit them now just because they are broken). (Btw how uglier preprocessor logic will become?) > > Rich