This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Am I crazy? Does newlib build nothing?


On 08/04/2011 05:56 PM, DJ Delorie wrote:
Anyway, taking your advice as I understand it, I have tried adding a
"--target=i686-pc-linux-gnu" option when I run newlib configure on my

newlib is an embedded library. As such, there's a limit to which targets it supports - it won't build on just anything. If you want to build newlib for something specific, specify that as --host (for natives) or --target (for crosses). As a special exception, to prevent naive users from building newlib when they probably don't want it, you have to jump through a few hoops to enable newlib (as a target) when building for linux (as a host):

../src/configure --host=i686-pc-linux --with-newlib

If you specify only --target, the top-level configure thinks you're
cross-compiling, and disables newlib.  If you naively configure for
linux (the top-level configure is shared among many projects), it
assumes you don't want newlib unless you explicitly ask for it.

Jeff: any reason why you can't cross-compile to a linux-newlib target?
That seems like a reasonable thing to want to do.

The current linux newlib implementation punts on a number of header files and expects they are installed on the system (i.e. glibc headers under linux and bits directories). The build is fragile and often breaks when I upgrade Fedora.


Cross-compiling was never requested. I'm not sure how much the native support is being used. The one perk it has it that it is a way of getting a static C library to use on Linux.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]