This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Building an XIP application on arm-elf
- From: "Shaun Jackman" <sjackman at gmail dot com>
- To: newlib at sources dot redhat dot com
- Date: Thu, 23 Feb 2006 12:58:58 -0700
- Subject: Building an XIP application on arm-elf
- Reply-to: "Shaun Jackman" <sjackman at gmail dot com>
Hello,
I'd like to try my hand at building an XIP application with newlib for
an arm-elf target. The application will be statically linked, so I'm
not worried about shared libraries yet. To build the XIP application
though, all the code has to be compiled as PIC. This includes libc, of
course. Well, now I say of course. That fine point slipped my mind
this morning.
Can newlib be coerced to build both a PIC and non-PIC libc.a in the
same build tree? I suspect the answer is no. In which case I'll build
the PIC libc.a in a separate build tree. I see newlib/configure has a
--with-pic option. Should I use this? Or should I simply pass -fPIC on
to the target's CFLAGS somehow?
Off-topic, will I likely have to do the same thing for libgcc.a?
Thanks for your help!
Shaun