toolchain: wrapper.sh: use --rpath-link
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Fri, 10 Feb 2023 15:02:06 +0000 (12:02 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Sun, 12 Feb 2023 13:55:06 +0000 (10:55 -0300)
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>
target/toolchain/files/wrapper.sh

index 0b06343f09ff7a04196bd8c26f94056b79aef8d3..4b3f8f911ab67ed57652c5325304e732b23bdc71 100755 (executable)
@@ -57,8 +57,8 @@ fi
 
 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=""