]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Get the g++ version to see if it is really clang.
authorWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 05:34:32 +0000 (22:34 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 22 Jun 2020 05:34:32 +0000 (22:34 -0700)
configure.ac

index 135a7e855d7d91e56d0e42c48bd074dcdc1f4baa..df0d89031aa5cfcbf3ba5b3cf58f92b901b7b9b5 100644 (file)
@@ -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