Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 25 Aug 2012 08:32:15 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Best bikeshed ever (feature test macros)

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.