[Toybox] _GNU_SOURCE definition problem

Rob Landley rob at landley.net
Fri Mar 16 06:13:34 PDT 2012


On 03/09/2012 12:51 AM, Georgi Chorbadzhiyski wrote:
> On 3/9/12 8:42 AM, Georgi Chorbadzhiyski wrote:
>> On 3/9/12 4:15 AM, Rob Landley wrote:
>>> On 03/08/2012 07:04 AM, Georgi Chorbadzhiyski wrote:
>>>> Around 03/08/2012 02:59 PM, Rob Landley scribbled:
>>> Just checked in fixes for some of it, the rest honestly seems to be musl
>>> bugs...
>>
>> I'll submit patches to musl. In their README they recommend defining
>> _GNU_SOURCE
>> to get "the kitchen sink" since they probably know that their handling
>> of different
>> defines is not optimal. Oh, well time to patch musl (for the record
>> make CC="musl-gcc -D_GNU_SOURCE" compiles (minus the support index and
>> strndupa)).
> 
> I'll do that, but isn't it better to just re-add #define _GNU_SOURCE in
> lib/portability.h?
> I know it is a big hammer and you hate it,

I'm trying to be standards compliant.  _GNU_SOURCE isn't a standard.

> but fixing every libc out there for
> standards compatability related to different defines is not going to be
> fun, let me count - uclibc, dietlibc, newlib, musl, eglibc?, bionic (patching
> it is easy, getting the patches merged, whole different matter).

For bionic I expect to need lib/portability.* workarounds anyway.

The musl developers are active and I expect at least eventual standards
compliance from musl since that's sort of the point of the project.

uClibc I maintain my own set of patches for in aboriginal, as long as it
builds in _that_ version I'm happy to post my patches to the list and
let them incorporate them into the next release (which may happen in our
lifetimes, you never know).  For example, I just did a uClibc patch to
fix strpcpy.

eglibc is a coat of paint over glibc, last I checked they don't even
have their own releases, just a nebulous ever-changing delta against the
last glibc that you download a random source control snapshot of.

dietlibc I don't care about, it's about as old as uClibc and has managed
to accomplish _less_.  Manuel Nova had a detailed takedown of that
project years ago, and it's the same maintainer...

Isn't newlib dead?  It was a cygnus project back before Red Hat bought
cygnus, then they briefly flirted with doing embedded development, then
discontinued that in 2006 when they went all Enterprise all the time. I
really haven't heard much about it since...

You missed klibc.  And I don't see how adding _GNU_DAMMIT is going to
help macosx...

Rob



More information about the Toybox mailing list