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: Building an XIP application on arm-elf


Hello Jeff,

On 2/23/06, Jeff Johnston <jjohnstn@redhat.com> wrote:
> Newlib can only be coerced to build two or more versions of libc.a in
> the same build tree through a multilib option.  A multilib solution also
> automatically takes care of libgcc.a and any other target libraries for you.

multilib does seem like a good way to build a PIC libc.a. Which files
would I need to modify to add a 'pic' multilib that adds -fPIC to
TARGET_CFLAGS?

> Yes, the arm-linux configuration knows to add -fPIC, but not arm-elf, if
> I read the gcc/config/arm files correctly.  I'm not sure how you
> override the target flags in this case.

Does arm-linux build libc.a as PIC by default as well, or is only
libc.so compiled as PIC? I get the impression that a statically linked
PIC executable is a rather unusual request, and untrodden ground.

Thanks,
Shaun

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