[Bug target/106088] ld cannot find dependent libraries when cross compiling

2022-06-27 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106088 Richard Biener changed: What|Removed |Added Resolution|--- |MOVED Status|UNCONFIRMED

[Bug target/106088] ld cannot find dependent libraries when cross compiling

2022-06-26 Thread galaxyking0419 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106088 --- Comment #4 from William Tang --- Okay, the '=' before search dir denotes sysroot replacement (https://sourceware.org/binutils/docs/ld/Options.html), so the configuration of ld should be correct. Anyway, it should be a binutils issue.

[Bug target/106088] ld cannot find dependent libraries when cross compiling

2022-06-26 Thread galaxyking0419 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106088 --- Comment #3 from William Tang --- Thanks, you are right, somehow, the ld of binutils has the wrong default SEARCH_DIR: [william@NoteBook ~]$ arm-linux-gnueabihf-ld --verbose | grep SEARCH SEARCH_DIR("/usr/lib/binutils/arm-linux-gnueabihf");

[Bug target/106088] ld cannot find dependent libraries when cross compiling

2022-06-26 Thread xry111 at mengyan1223 dot wang via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106088 Xi Ruoyao changed: What|Removed |Added CC||xry111 at mengyan1223 dot wang --- Comment

[Bug target/106088] ld cannot find dependent libraries when cross compiling

2022-06-26 Thread galaxyking0419 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106088 --- Comment #1 from William Tang --- The mentioned libraries did exist in the cross compile environment. Compiling with command "arm-linux-gnueabihf-gcc main.c -Wl,-rpath-link,/usr/arm-linux-gnueabihf/usr/lib -larchive" works just fine.