# HG changeset patch # User Charles Pigott # Date 2018-09-24 21:18:58 # Node ID 837e8a24a9b8c27f8581eca1a0a5f6ef380b6450 # Parent 12c7cfb8fcee490ea5fe2512dbb81240913ece2e Fix #6880: [OSX] Clang version detection diff --git a/config.lib b/config.lib --- a/config.lib +++ b/config.lib @@ -1331,7 +1331,8 @@ make_compiler_cflags() { fi elif echo "$version_line" | grep -q "clang"; then # Enable some things only for certain clang versions - cc_version="`$1 -v 2>&1 | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`" + # Need to try really hard to get the version line, because OSX clang likes to hide its true version + cc_version="`$1 -v 2>&1 | grep -i version | head -n 1 | sed s@[^0-9]@@g | cut -c 1-2`" # aliasing rules are not held in openttd code flags="$flags -fno-strict-aliasing"