common/autoconf/generated-configure.sh
Print this page
rev 997 : 8037825: Fix warnings and enable "warnings as errors" in serviceability native libraries
Reviewed-by:
*** 671,680 ****
--- 671,681 ----
X_CFLAGS
XMKMF
FIXPATH
ZIP_DEBUGINFO_FILES
ENABLE_DEBUG_SYMBOLS
+ CFLAGS_WARNINGS_ARE_ERRORS
COMPILER_SUPPORTS_TARGET_BITS_FLAG
ZERO_ARCHFLAG
LDFLAGS_CXX_JDK
LDFLAGS_JDKEXE_SUFFIX
LDFLAGS_JDKLIB_SUFFIX
*** 4230,4240 ****
# definitions. It is replaced with custom functionality when building
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
! DATE_WHEN_GENERATED=1394794899
###############################################################################
#
# Initialization / Boot-strapping
#
--- 4231,4241 ----
# definitions. It is replaced with custom functionality when building
# custom sources.
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
! DATE_WHEN_GENERATED=1395236071
###############################################################################
#
# Initialization / Boot-strapping
#
*** 41987,41996 ****
--- 41988,42015 ----
COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
fi
+ 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)
#
# ENABLE_DEBUG_SYMBOLS