Trying to build newlib without GOT

Erik Christiansen
Fri Mar 7 06:24:00 GMT 2003

   Is there something in the newlib distribution which causes the build
   to create position independent code, but in a non-obvious way?

   Having successfully built newlib for an MPC850, using:

../newlib-1.9.0/configure -host=ppc-elf --target=powerpc-linux \

   we find that the generated code used Global Offset Tables. i.e.
   position independent code is being generated. But there is no -fpic
   or -fPIC in any of the makefiles:


   If PIC is not obviously turned on, I'm wondering how we might turn it

   the only non-comment line in config.cache is:

ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}

   so it's a bit awkward to diagnose what the newlib config has done.

   Would building a powerpc-elf-gcc, instead of using powerpc-linux-gcc,
   be the answer? It's just a WAG, but I'll try it next.


More information about the Newlib mailing list