https://sourceware.org/bugzilla/show_bug.cgi?id=23727

Nehal J Wani <nehaljw.kkd1 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |---

--- Comment #3 from Nehal J Wani <nehaljw.kkd1 at gmail dot com> ---
I read through the conversation on the mailing list.

Further observations:
 - If I do add -Wl,-rpath-link,$PWD/libs the link succeeds. 
 - If I use the gold linker, the link succeeds. -Wl,-fuse-ld=gold

If you think that not searching out of the sysroot at all is the correct
behavior, then why is it restricted only to -rpath and not applied to
-rpath-link? Why is the behavior of the cross gold linker different?

My use case is simple. I want to cross compile let's say libssh2 for a target
architecture and I have the libcrypto.so and libz.so dependencies already
compiled for the target architecture kept in /path/to/some/prefix/libs. While
compiling libssh2, I want to link against those libraries. Why am I expected to
keep them in the sysroot always? Does it not defeat the whole purpose of having
-rpath in the first place? Does this not seem like a valid use case?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to