Commit 3d12ddae authored by Julien Muchembled's avatar Julien Muchembled

gcc: make the ld wrapper add paths via -rpath if there's already an -rpath arg

We'd prefer ld to always take LD_RUN_PATH into account, even if any
rpath is specified in the command-line. We could actually change the
wrapper this way but it would not be consistent with the case where
the SR is built with system gcc.
parent 3f4c2101
...@@ -42,13 +42,11 @@ post-install = ...@@ -42,13 +42,11 @@ post-install =
done done
cat <<EOF >ld cat <<EOF >ld
#!/bin/sh -e #!/bin/sh -e
case \$#:\$1 in 0:|1:-*) ;; *) for x; do case \$x in -rpath=*)
if [ "\$LD_RUN_PATH" ] set -- "\$@" $2
then LD_RUN_PATH=\$LD_RUN_PATH$1 ! break
else set -- "\$@" $2
fi
;; ;;
esac esac; done && export LD_RUN_PATH=\$${LD_RUN_PATH:+\$LD_RUN_PATH:}$${1#:}
exec ${binutils:location}/bin/ld "\$@" exec ${binutils:location}/bin/ld "\$@"
EOF EOF
chmod +x ld chmod +x ld
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment