This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: printf and glibc extensions
- From: Eric Blake <ebb9 at byu dot net>
- To: Duane Ellis <duane at duaneellis dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 13 Apr 2007 06:21:26 -0600
- Subject: Re: printf and glibc extensions
- References: <461EFB2A.6080608@byu.net> <461F0D2D.6050101@duaneellis.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Duane Ellis on 4/12/2007 10:55 PM:
> Eric Blake wrote:
>> Is there any interest in the following glibc extensions to printf?
> newlib is nice because it is is specifically _NOT_ the bloated monster
> glibc.
Newlib has multiple clients. For embedded systems, yes, newlib is nice
because it prunes away unrequired stuff. But one of its clients is
Cygwin, which has the stated goal of being a Linux emulation.
>
> Is the goal a glibc clone? If so, the rhetorical question becomes: Why
> not just use glibc?
> And leave newlib alone..
Because glibc does not compile on Windows, so cygwin relies on newlib as
the underpinnings of its Linux emulation. Many things belong better in
cygwin proper, leaving newlib alone, but modifying printf has to be done
where printf is defined - in newlib.
And my proposal included removing cruft from newlib for the benefit of
embedded systems under the control of the new configure switch - you
should not need the non-standardized %D, for example. For that matter,
true embedded programmers know that if their system is limited on
resources, using printf is a non-starter because of the amount of stuff it
drags in during static linking, so making printf bigger does not impact
the smallest resource users.
But I am aware that bloat is bad for bloat's sake, which is why I floated
this proposal before writing a patch, and which is why I am trying to
justify these additions, under the control of a configure switch.
> Perhaps, a --enable-newlib-lean-and-mean is needed....
>>
> There are too many --enable-this-funky-feature-options.
I agree that it might be nice to have one switch that quickly sets the
defaults of all the other switches. Bash is a good example of this,
having nearly 30 fine-tuned options, then a couple of top-level options
like --enable-minimal-config and --enable-strict-posix-default that set
multiple of those fine-tuned options at once.
>
> Worse, you must dig through levels of ./configure to find the one you need.
No, ./configure --help should be able to list them all (grabbing the
recursive help in your behalf).
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGH3XG84KuGfSFAYARAnINAJ4/FDAdxljDAtAS3/H2HOdUyMaw5ACgt6v7
RzbEeAnMzd3pCMB/5WZN2tc=
=w6No
-----END PGP SIGNATURE-----