]> granicus.if.org Git - sudo/commitdiff
Use clang on macOS if present
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 23 May 2017 18:56:59 +0000 (12:56 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 23 May 2017 18:56:59 +0000 (12:56 -0600)
mkpkg

diff --git a/mkpkg b/mkpkg
index f889a0883d538569facc3f361f4319bf5822a323..43ca7f15a66992caf096a3291b72fe2c9ecc227b 100755 (executable)
--- a/mkpkg
+++ b/mkpkg
@@ -122,6 +122,12 @@ fi
 # Choose compiler options by osversion if not cross-compiling.
 if [ "$crossbuild" = "false" ]; then
     case "$osversion" in
+       macos*)
+           # Use clang on macOS if present
+           if [ -z "$CC" -a -x /usr/bin/clang ]; then
+               CC=/usr/bin/clang; export CC
+           fi
+           ;;
        sol[0-9]*)
            # Use the Sun Studio C compiler on Solaris if possible
            if [ -z "$CC" -a -x /usr/bin/cc ]; then