From: Wayne Davison Date: Mon, 22 Jun 2020 05:34:32 +0000 (-0700) Subject: Get the g++ version to see if it is really clang. X-Git-Tag: v3.2.1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8d2d71663c93cf72f698842074f66f7d548c0da;p=thirdparty%2Frsync.git Get the g++ version to see if it is really clang. --- diff --git a/configure.ac b/configure.ac index 135a7e85..df0d8903 100644 --- a/configure.ac +++ b/configure.ac @@ -250,7 +250,9 @@ if test x"$SIMD" != x""; then SIMD='$(SIMD_'"$SIMD)" # We only use c++ for its target attribute dispatching, disable unneeded bulky features CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-rtti" - case "$CXX" in + # Apple often has "g++" as a symlink for clang. Try to find out the truth. + CXX_VERSION=`$CXX --version 2>/dev/null | head -n 2` + case "$CXX_VERSION" in *clang*) CXXFLAGS="$CXXFLAGS -fno-slp-vectorize" ;; # avoid a performance hit esac else