don't pass -rpath with -r, as they conflict (#4)

This commit is contained in:
Jacob Heider 2022-10-26 20:29:40 -04:00 committed by GitHub
parent e1d2ab4f47
commit 77a44f7424
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -1,11 +1,19 @@
#!/bin/sh #!/bin/sh
exe="$(basename $0)" exe=$(basename "$0")
if test -z "$TEA_PREFIX" if test -z "$TEA_PREFIX"
then then
echo '$TEA_PREFIX mysteriously unset' >&2 echo 'TEA_PREFIX mysteriously unset' >&2
exit 1 exit 1
else else
# At a minimum, `ld` will complain if you mix the `-r` and `-rpath` flags,
# so if any argument to this script is `-r`, we just pass through without
# additions.
for word in "$@"; do
if test "$word" = "-r"; then
exec /usr/bin/"$exe" "$@"
fi
done
exec /usr/bin/"$exe" "$@" -rpath "$TEA_PREFIX" exec /usr/bin/"$exe" "$@" -rpath "$TEA_PREFIX"
fi fi

View file

@ -41,3 +41,4 @@ build:
test: | test: |
cc --version cc --version
ld --help ld --help