Peng Yu wrote:
I still get some errors. And I checked that ld does not have the options -Wl,-rpath. Can somebody let me know what the problem is?
-Wl,-foobar is a *compiler* option which passes -foobar directly to the *linker*. (There is also an option -Wa,-foobar which would pass -foobar to the *assembler*).
So if you compile with -Wl,-rpath, the linker will see only -rpath, without the -Wl,
I'm not sure what your problem is - I think building gcc on some systems is a bit of a black art. But you need to know that -Wl,-rpath is not something the linker will see - it will only see the -rpath.