Skip to content

Commit 4757d9b

Browse files
committed
Auto merge of #26185 - dhuseby:fixing_freebsd_configure, r=brson
On FreeBSD machines without GCC installed, the configure script will now fall back to using clang.
2 parents 21dd4e2 + 44d487d commit 4757d9b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

configure

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,18 @@ then
899899
fi
900900
fi
901901

902+
# If the clang isn't already enabled, check for GCC, and if it is missing, turn
903+
# on clang as a backup.
904+
if [ -z "$CFG_ENABLE_CLANG" ]
905+
then
906+
CFG_GCC_VERSION=$("$CFG_GCC" --version 2>&1)
907+
if [ $? -ne 0 ]
908+
then
909+
step_msg "GCC not installed, will try using Clang"
910+
CFG_ENABLE_CLANG=1
911+
fi
912+
fi
913+
902914
# Okay, at this point, we have made up our minds about whether we are
903915
# going to force CFG_ENABLE_CLANG or not; save the setting if so.
904916
if [ ! -z "$CFG_ENABLE_CLANG" ]

0 commit comments

Comments
 (0)