8037825: Fix warnings and enable "warnings as errors" in serviceability native libraries

Reviewed-by: erikj, ihse
This commit is contained in:
Staffan Larsen 2014-03-21 09:35:43 +01:00
parent ac1be38a4c
commit 89a408692d
3 changed files with 38 additions and 1 deletions

@ -735,4 +735,20 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
case "${TOOLCHAIN_TYPE}" in
microsoft)
CFLAGS_WARNINGS_ARE_ERRORS="/WX"
;;
solstudio)
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
;;
gcc)
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;;
clang)
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;;
esac
AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)
])

@ -673,6 +673,7 @@ XMKMF
FIXPATH
ZIP_DEBUGINFO_FILES
ENABLE_DEBUG_SYMBOLS
CFLAGS_WARNINGS_ARE_ERRORS
COMPILER_SUPPORTS_TARGET_BITS_FLAG
ZERO_ARCHFLAG
LDFLAGS_CXX_JDK
@ -4232,7 +4233,7 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1394794899
DATE_WHEN_GENERATED=1395236071
###############################################################################
#
@ -41989,6 +41990,24 @@ $as_echo "$supports" >&6; }
case "${TOOLCHAIN_TYPE}" in
microsoft)
CFLAGS_WARNINGS_ARE_ERRORS="/WX"
;;
solstudio)
CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
;;
gcc)
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;;
clang)
CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: warnings are errors: $CFLAGS_WARNINGS_ARE_ERRORS" >&5
$as_echo "warnings are errors: $CFLAGS_WARNINGS_ARE_ERRORS" >&6; }
# Setup debug symbols (need objcopy from the toolchain for that)

@ -324,6 +324,8 @@ CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
C_FLAG_DEPS:=@C_FLAG_DEPS@
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
CFLAGS_WARNINGS_ARE_ERRORS:=@CFLAGS_WARNINGS_ARE_ERRORS@
# Tools that potentially need to be cross compilation aware.
CC:=@FIXPATH@ @CCACHE@ @CC@