summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-25 15:01:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-26 08:11:54 +0000
commit3a4860a751980b566b44d57cde188292df5e8726 (patch)
tree65b66af35eb699a5435d1d53f24c3ac416a90dbe /configure.ac
parent18898e13fda25fe6dc85318dd0711355c7b2cc26 (diff)
Force --std=gnu89 for clang.
clang builds with a more modern standard by default On Linux gcc builds with gnu89 by default. On Windows MSVC only supports C90. Hence it makes sense to force gnu89 for clang to catch potential gnu89/C90 incompatibilities locally. (C90 and gnu89 appear to be quite close, however using C90 with clang results in warnings and errors to do with comments on lines with code (-Wcomment), and also the lack of inline (instead you would use __inline -- this is #define'd in for Windows only).) Change-Id: I569af7541b86aa0f83ebb66770d43737bac5d21f Reviewed-on: https://gerrit.libreoffice.org/9904 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f9c04e84e143..499d765d21a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3245,6 +3245,10 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
fi
+
+ # On Windows MSVC only supports C90 so force gnu89 (especially in clang) to
+ # to catch potential gnu89/C90 incompatibilities locally.
+ CFLAGS="$CFLAGS -std=gnu89"
fi
AC_SUBST(COM_GCC_IS_CLANG)