mailing list of musl libc
 help / color / mirror / code / Atom feed
From: orc <orc@sibserver.ru>
To: musl@lists.openwall.com
Subject: Re: Best bikeshed ever (feature test macros)
Date: Sat, 25 Aug 2012 23:29:44 +0800	[thread overview]
Message-ID: <20120825232944.21b34f20@sibserver.ru> (raw)
In-Reply-To: <20120825123215.GL27715@brightrain.aerifal.cx>

On Sat, 25 Aug 2012 08:32:15 -0400
Rich Felker <dalias@aerifal.cx> 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


  reply	other threads:[~2012-08-25 15:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 21:41 Rich Felker
2012-08-24 22:24 ` Gregor Richards
2012-08-24 23:59 ` Szabolcs Nagy
2012-08-25  7:35 ` orc
2012-08-25 12:32   ` Rich Felker
2012-08-25 15:29     ` orc [this message]
2012-08-25  9:11 ` Luca Barbato
2012-08-27 18:08 ` Isaac Dunham
2012-08-29  5:34 ` philomath
2012-08-29 13:49   ` Rich Felker
2012-08-29 14:01     ` Gregor Richards
2012-08-29 14:43       ` Rich Felker
2012-08-29 15:08         ` Bobby Bingham
2012-08-29 15:23           ` Rich Felker
2012-08-29 17:17             ` Gregor Richards
2012-08-29 17:59       ` Isaac Dunham
2012-08-29 18:08         ` Rich Felker
2012-09-02  8:48 ` Arvid E. Picciani
2012-09-02 15:19   ` Rich Felker
2012-09-02 15:27     ` Arvid E. Picciani
2012-09-02 15:44       ` Rich Felker
2012-09-02 17:00 ` nwmcsween
2012-09-02 17:06   ` Gregor Richards
2012-09-02 17:13     ` Rich Felker
2012-09-02 17:18       ` Gregor Richards
2012-09-02 17:10   ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120825232944.21b34f20@sibserver.ru \
    --to=orc@sibserver.ru \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).