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/11 14:15, Jeff Johnston wrote:

By default, newlib isn't configured to be built natively. That is glibc's domain.


That said, you can build newlib on a 32-bit x86 Linux system if you specify --with-newlib on the configuration with
--target=i686-pc-linux-gnu


x86_64 linux won't work at this time. I think it might work if the code were set up to allow the configuration and then force newlib to use the x86 machine sub-directories (there are no x86_64 machine subdirectories in newlib/libc/sys/linux).

-- Jeff J.


Thank you, that is good to know.


Can you explain more about the --with-newlib configuration? I have seen it mentioned many times but I don't really understand it. For example, I have seen many examples of building gcc as a minimal first compiler (whose job is only to build newlib) that give the --with-newlib argument when building this gcc, but I don't understand because these examples haven't even downloaded, unpacked, or compiled newlib yet, so I don't understand what --with-newlib accomplishes there. Even after newlib is built, I don't understand what it accomplishes as an argument to the gcc configure script.

Also I don' t understand why you have referenced a --with-newlib option when talking about building newlib. Is --with-newlib really a useful argument to pass to the newlib configure script itself? If so, what does it do?

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 x86_64 host, but the result is the same: the Makefile produces nothing except a little bit of makeinfo stuff.

Finally, I have run into another problem now that I have my minimal gcc build and am trying to use it to compile newlib:

newlib configuration gets an error in trying to determine the extension for executables, but I don't know why the newlib configure script would care about the extension of executables (because it never needs to build executables, or at least shouldn't, in my understanding). It seems that these checks should simply not be done. I have dug into the newlib/newlib/configuration script and see that it has different logic, that specifically doesn't run this test; but the toplevel newlib configuration does run this test.

Am I not supposed to be doing a top-level newlib configure? Should I be doing a configure specifically in newlib/libgloss and newlib/newlib separately? I'll give that a go and see what happens ...

Thanks,
Bryan


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