summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2018-09-24 22:18:58 +0100
committerPatric Stout <truebrain@openttd.org>2019-01-05 17:39:11 +0100
commit175829b8b5a24efaa46e18d2a0d0b1f59d14e72d (patch)
tree5e65c4035adbe2f2bd8156346be7f8df0609ae1d
parent0e7af55ef704757dfee40c1799359df01b937ebb (diff)
downloadopenttd-175829b8b5a24efaa46e18d2a0d0b1f59d14e72d.tar.xz
Fix #6880: [OSX] Clang version detection
-rw-r--r--config.lib3
1 files changed, 2 insertions, 1 deletions
diff --git a/config.lib b/config.lib
index 2d2f864d7..c5b7ee09c 100644
--- 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"