This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

armhf linker does not find dynamic libraries

E.g., using

TOOL = /opt/rpi/arm-gcc/bin
$(TOOL)/arm-none-linux-gnueabihf-ld.gold

where /opt/rpi/arm-gcc is the contents of gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz, I get this output:

Attempt to open /opt/rpi/sysroot/opt/vc/lib/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/lib/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/arm-linux-gnueabihf/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/lib/libbcm_host.a failed
Attempt to open /opt/rpi/sysroot/usr/lib/libbcm_host.a failed
error: cannot find -lbcm_host

So it's only looking for .a libs instead of finding /opt/rpi/sysroot/opt/vc/lib/libbcm_host.so, which exists. I'm passing -Bdynamic to the linker, what am I missing?