[Groonga-commit] groonga/groonga at 5e6a398 [master] mrb: don't use -Wformat-nonliteral build flag for mruby

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jul 17 11:50:12 JST 2015


Kouhei Sutou	2015-07-17 11:50:12 +0900 (Fri, 17 Jul 2015)

  New Revision: 5e6a398ef5080a1ce4495d93528aed77de125469
  https://github.com/groonga/groonga/commit/5e6a398ef5080a1ce4495d93528aed77de125469

  Message:
    mrb: don't use -Wformat-nonliteral build flag for mruby
    
    mruby uses nonliteral format for implementing printf() like API.

  Modified files:
    configure.ac
    vendor/mruby/Makefile.am

  Modified: configure.ac (+6 -0)
===================================================================
--- configure.ac    2015-07-17 11:47:29 +0900 (6bf747c)
+++ configure.ac    2015-07-17 11:50:12 +0900 (d0c37f5)
@@ -143,6 +143,7 @@ TEST_CXXFLAGS=""
 NO_STRICT_ALIASING_CFLAGS=""
 NO_FLOAT_EQUAL_CFLAGS=""
 NO_BAD_FUNCTION_CAST_CFLAGS=""
+NO_FORMAT_NONLITERAL_CFLAGS=""
 if test "$GCC" = "yes"; then
   CHECK_BUILD_FLAG([-Wall])
   CHECK_BUILD_FLAG([-Wextra])
@@ -170,6 +171,10 @@ if test "$GCC" = "yes"; then
   if test "x$check_cflag" = "xyes"; then
     NO_BAD_FUNCTION_CAST_CFLAGS="-Wno-bad-function-cast"
   fi
+  CHECK_CFLAG([-Wformat-nonliteral])
+  if test "x$check_cflag" = "xyes"; then
+    NO_FORMAT_NONLITERAL_CFLAGS="-Wno-format-nonliteral"
+  fi
   if test "$CLANG" = "no"; then
     CHECK_BUILD_FLAG([-Wcast-align])
   fi
@@ -202,6 +207,7 @@ AC_SUBST(TEST_CXXFLAGS)
 AC_SUBST(NO_STRICT_ALIASING_CFLAGS)
 AC_SUBST(NO_FLOAT_EQUAL_CFLAGS)
 AC_SUBST(NO_BAD_FUNCTION_CAST_CFLAGS)
+AC_SUBST(NO_FORMAT_NONLITERAL_CFLAGS)
 
 AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL

  Modified: vendor/mruby/Makefile.am (+2 -1)
===================================================================
--- vendor/mruby/Makefile.am    2015-07-17 11:47:29 +0900 (764aa7e)
+++ vendor/mruby/Makefile.am    2015-07-17 11:50:12 +0900 (f472479)
@@ -12,7 +12,8 @@ DEFAULT_INCLUDES =						\
 
 CFLAGS +=					\
 	$(NO_FLOAT_EQUAL_CFLAGS)		\
-	$(NO_BAD_FUNCTION_CAST_CFLAGS)
+	$(NO_BAD_FUNCTION_CAST_CFLAGS)		\
+	$(NO_FORMAT_NONLITERAL_CFLAGS)
 
 if WITH_MRUBY
 noinst_LTLIBRARIES = libmruby.la
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index