Don't use -Wwrite-strings on Solaris
They have a weirdass struct option {} so we can't use this warning.
This commit is contained in:
15
configure.ac
15
configure.ac
@@ -11,14 +11,27 @@ AC_CANONICAL_HOST
|
||||
AM_CONDITIONAL(LD_ISCSI,
|
||||
[expr "$host_os" : linux > /dev/null 2>&1])
|
||||
|
||||
enable_write_strings="yes"
|
||||
|
||||
case $host in
|
||||
*solaris*)
|
||||
enable_write_strings="no"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_ENABLE([werror], [AS_HELP_STRING([--disable-werror],
|
||||
[Disables building with -Werror by default])])
|
||||
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
WARN_CFLAGS="-Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wno-strict-aliasing"
|
||||
WARN_CFLAGS="-Wall -W -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wno-strict-aliasing"
|
||||
if test "x$enable_werror" != "xno"; then
|
||||
WARN_CFLAGS="$WARN_CFLAGS -Werror"
|
||||
fi
|
||||
if test "x$enable_write_strings" != "xno"; then
|
||||
WARN_CFLAGS="$WARN_CFLAGS -Wwrite-strings"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(WARN_CFLAGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user