This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Darwin: set ld to 'cc' if $cc is 'cc' or empty, $cc otherwise.
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 14 Sep 2014 17:28:00 +0000 (13:28 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sun, 14 Sep 2014 17:29:39 +0000 (13:29 -0400)
hints/darwin.sh

index 35614a2..da79297 100644 (file)
@@ -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