newlib under Linux, 1st try

Werner Almesberger
Sun Aug 20 16:51:00 GMT 2000

[ I'm not subscribed to the newlib list. Please Cc any replies to me. ]

On my quest for a way to build small static executables (for initrd and 
such), I came across newlib. Of course, it doesn't build out of the box
under Linux, so I started to add a few files to get a "hello world" and
such going. My current stuff (vs. the CVS tree) is at
My current goal is to be able to write a little shell.

Bugs and restrictions:
 - you really can't do much more than building hello.c
 - may have subtle compiler dependencies (I'm using egcs-2.91.66 on 
   RedHat 6.2)
 - non-ia32 may need additional work
 - the include structure is a bit of a nightmare 
 - had to include two machine-generated files in the patch, which 
   probably indicates that I haven't quite figured out how autoconf
   and automake are supposed to be used

BTW, libc/include/sys/errno.h should probably separate the errno access
from the value table. The former can't be easily changed anyway (e.g.
perror hard-codes errno access via struct _reent), so maybe that part
could even move into include/errno.h

- Werner

 / Werner Almesberger, ICA, EPFL, CH /

More information about the Newlib mailing list