can newlib really work as linux C library on i686 or x86_64?

Mike Frysinger vapier@gentoo.org
Sun May 10 21:01:00 GMT 2015


On 05 May 2015 17:20, Junfeng Dong wrote:
> Recently I tried to use newlib to build simple programs on x86_64 or
> i686. I run into various problems.Can someone please tell me what is
> the mistake I made.
> 1. when build it as part of cross toolchain (target is i686-linux-elf,
> host is x86_64). it shows crt0.o is missing.
> 2. native build with "-with-newlib --disable-multilib" on i686
> machine. it failed with
> /usr/include/i386-linux-gnu/bits/types.h:170:1: error: unknown type
> name ‘__FSWORD_T_TYPE’
> 
> I searched the history mailing list. It is said that "Newlib is almost
> NEVER built as a linux library. That it can do so AT ALL is a recent
> change and rarely used" "Newlib is intended for bare-metal targets
> like m32c-elf, arm-elf, h8300-coff, etc."
> Have things changed from that? Can newlib really work as linux C
> library on i686 and fully tested?

i don't think anyone uses newlib under Linux.  it's possible to make it happen, 
but you're going to have to put in the effort.  in the end though, what's the 
point ?  use one of the many C libraries out there that already support Linux.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20150510/56101c32/attachment.sig>


More information about the Newlib mailing list