提交 0742defa authored 作者: Michael Jerris's avatar Michael Jerris

FS-9109: [build] attempt to fix misleading indentation errors on gcc 6.0

上级 68698888
...@@ -377,6 +377,16 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then ...@@ -377,6 +377,16 @@ if test "$ax_cv_c_compiler_vendor" = "gnu"; then
[ac_cv_gcc_supports_w_no_unused_result=no])]) [ac_cv_gcc_supports_w_no_unused_result=no])])
CFLAGS="$saved_CFLAGS" CFLAGS="$saved_CFLAGS"
AC_MSG_RESULT($ac_cv_gcc_supports_w_no_unused_result) AC_MSG_RESULT($ac_cv_gcc_supports_w_no_unused_result)
saved_CFLAGS="$CFLAGS"
AC_CACHE_CHECK([whether compiler supports -Wno-misleading-indentation],
[ac_cv_gcc_supports_w_no_misleading_indentation], [
CFLAGS="$CFLAGS -Wno-misleading-indentation -Wno-error=misleading-indentation"
AC_TRY_COMPILE([],[return 0;],
[ac_cv_gcc_supports_w_no_misleading_indentation=yes],
[ac_cv_gcc_supports_w_no_misleading_indentation=no])])
CFLAGS="$saved_CFLAGS"
AC_MSG_RESULT($ac_cv_gcc_supports_w_no_misleading_indentation)
fi fi
# tweak compiler specific flags # tweak compiler specific flags
...@@ -413,6 +423,9 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then ...@@ -413,6 +423,9 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result) APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)
fi fi
if test "$ac_cv_gcc_supports_w_no_misleading_indentation" = yes; then
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-misleading-indentation)
fi
if test "${enable_64}" = "yes"; then if test "${enable_64}" = "yes"; then
case "$host" in case "$host" in
*darwin*) *darwin*)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论