This is the mail archive of the mailing list for the GCC 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]

Gcc+binutils+libc cross-compiling: path to malformed in "ld".

Hi all,

I am having trouble linking a "hello world" program cross-compiled
for a mips-linux target. GCC can find the headers properly, but
there is some --sysroot silliness going on: mips-linux-ld ends
up catenating two absolute paths, and concludes that it cannot
find, which is there.

GCC is version 4.1.1
Binutils 2.17
Glibc is CVS head.

When configuring gcc, I used --with-sysroot=/path/to/sysroot,
where glibc is installed under usr/. The header files are
found correctly.

When the linker is invoked, it is given


The linker resolves  -lc  to the absolute name
/path/to/sysroot/usr/lib/ But then it catenates that
to the sysroot, resulting in

  /path/to/sysroot/path/to/sysroot/usr/lib/ which is nonsense.

I can see using strace that it's actually trying to access that path.
And so it dies with "cannot find /path/to/sysroot/lib/
inside /path/to/sysroot".

So, what's the /right/ way to coordinate the location of the
target headers and libraries between gcc and binutils when


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