From 7ac13204f230debd9543c11d29401f3b3b1ad193 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 22 Nov 2022 07:21:01 -0700 Subject: [PATCH] Use clang, not /usr/bin/cc on FreeBSD and macOS. While /usr/bin/cc _is_ clang on those platforms, some static analyzers get confused if we don't run it as clang. --- scripts/mkpkg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mkpkg b/scripts/mkpkg index 7ec259a31..2882d2aca 100755 --- a/scripts/mkpkg +++ b/scripts/mkpkg @@ -136,9 +136,9 @@ fi if [ "$crossbuild" = "false" ]; then case "$osversion" in FreeBSD*|macos*) - # Use the system compiler on FreeBSD and macOS - if [ -z "$CC" -a -x /usr/bin/cc ]; then - CC=/usr/bin/cc; export CC + # Use clang, not gcc, on FreeBSD and macOS + if [ -z "$CC" ]; then + CC=clang; export CC fi ;; esac