2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 01:49:11 +00:00

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.
This commit is contained in:
Todd C. Miller 2022-11-22 07:21:01 -07:00
parent da7a5ecabd
commit 7ac13204f2

View File

@ -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