plan9port: fix linker flags for macosx

This commit is contained in:
Jason Felice 2020-02-19 20:31:14 -05:00
parent 82a6834e3b
commit 4d2a8257ed
1 changed files with 11 additions and 4 deletions

View File

@ -8,13 +8,20 @@ plan9portLinkFlags()
local -a linkFlags=() local -a linkFlags=()
eval set -- "$NIX_LDFLAGS" eval set -- "$NIX_LDFLAGS"
while (( $# > 0 )); do while (( $# > 0 )); do
if [[ $1 = -rpath ]]; then case "$1" in
linkFlags+=( "-Wl,-rpath,$2" ) -rpath|-macosx_version_min|-sdk_version)
linkFlags+=( "-Wl,$1,$2" )
shift 2 shift 2
else ;;
-no_uuid)
linkFlags+=( "-Wl,$1" )
shift
;;
*)
linkFlags+=( "$1" ) linkFlags+=( "$1" )
shift shift
fi ;;
esac
done done
echo "${linkFlags[*]}" echo "${linkFlags[*]}"
} }