summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-09-14 13:28:00 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-09-14 13:29:39 -0400
commit990a70b8c9866c888194f4c2c6d152d7911b3c34 (patch)
tree51add62c9527a7349f133afe43650812dcadb1b8 /hints
parent409c6472cedc6771a158a61dbbf8154d0246dc5b (diff)
downloadperl-990a70b8c9866c888194f4c2c6d152d7911b3c34.tar.gz
Darwin: set ld to 'cc' if $cc is 'cc' or empty, $cc otherwise.
Diffstat (limited to 'hints')
-rw-r--r--hints/darwin.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/hints/darwin.sh b/hints/darwin.sh
index 35614a24e1..da792974be 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -175,8 +175,11 @@ esac
# Allow the user to override ld, but modify it as necessary below
case "$ld" in
'') case "$cc" in
- gcc*|g++*) ld="$cc" ;;
- *) ld='cc';;
+ # If the cc is explicitly something else than cc (or empty),
+ # set the ld to be that explicitly something else. Conversely,
+ # if the cc is 'cc' (or empty), set the ld to be 'cc'.
+ cc|'') ld='cc';;
+ *) ld="$cc" ;;
esac
;;
esac