This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Trying to build newlib without GOT
- From: Erik Christiansen <erik at dd dot nec dot com dot au>
- To: newlib at sources dot redhat dot com
- Date: Fri, 7 Mar 2003 17:13:16 +1100
- Subject: Trying to build newlib without GOT
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 \
-prefix=/usr/local/src/newlib_ppc_elf_1.9.0/output/
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:
PICFLAG =
PICFLAG_FOR_TARGET =
If PIC is not obviously turned on, I'm wondering how we might turn it
off??
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.
Regards,
Erik