From: Todd C. Miller Date: Tue, 23 May 2017 18:56:59 +0000 (-0600) Subject: Use clang on macOS if present X-Git-Tag: SUDO_1_8_21^2~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f794de95030b597d3b359f1f6699c8f1bcec1064;p=sudo Use clang on macOS if present --- diff --git a/mkpkg b/mkpkg index f889a0883..43ca7f15a 100755 --- 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