Use --rpath-link option instead of --rpath. The former is used only at
link-time, while the latter is searched at run-time as well.
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
case $TOOLCHAIN_PLATFORM in
gnu|glibc|uclibc|musl)
- GCC_SYSROOT_FLAGS="--sysroot=$TOOLCHAIN_SYSROOT -Wl,-rpath=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
- LD_SYSROOT_FLAGS="-rpath=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
+ GCC_SYSROOT_FLAGS="--sysroot=$TOOLCHAIN_SYSROOT -Wl,-rpath-link=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
+ LD_SYSROOT_FLAGS="-rpath-link=$TOOLCHAIN_SYSROOT/lib:$TOOLCHAIN_SYSROOT/usr/lib"
;;
*)
GCC_SYSROOT_FLAGS=""