Parker
Parker

Reputation: 1102

PIC/non-PIC code errors when cross compiling

This is totally outside my area of expertise, so forgive me if this seems rather elementary. I've never really worked with C, so this is a bit new to me. I've been tasked with cross-compiling the ISC's DHCP implementation into MIPS. I have the compiler (mipsel-linux-gcc) and other assorted tools and it compiles fine but it fails when linking on every file:

Bad value: failed to merge target specific data of file ... linking PIC files with non-PIC files

-fPIC and -fno-PIC changed nothing. Is there a simple solution to this, or will I need to start rewriting chunks of this software? Any input would be appreciated, I'm at a bit of a loss.

My configure line is as follows:

./configure CC=mipsel-linux-gcc CPP=mipsel-linux-cpp --host=mips --build=i686-pc-linux-gnu

Upvotes: 1

Views: 1405

Answers (1)

nmichaels
nmichaels

Reputation: 50999

Something's wrong with libraries you're linking in. Make sure you have the standard library compiled for PIC, and that you link to it, not your system's.

Upvotes: 4

Related Questions