[Libreoffice-commits] core.git: configure.ac
Andrzej Hunt
andrzej.hunt at collabora.com
Fri Sep 26 01:12:25 PDT 2014
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 3a4860a751980b566b44d57cde188292df5e8726
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Wed Jun 25 15:01:14 2014 +0100
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 at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/configure.ac b/configure.ac
index f9c04e8..499d765 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)
More information about the Libreoffice-commits
mailing list