diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4 index cf7f4534c89..6d6e75bca16 100644 --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 @@ -799,15 +799,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], $1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}" $1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized" - elif test "x$TOOLCHAIN_TYPE" = xclang; then - NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks" - FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG], - PREFIX: $3, - IF_FALSE: [ - NO_DELETE_NULL_POINTER_CHECKS_CFLAG= - ] - ) - $1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}" fi if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then @@ -929,17 +920,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], # $2 - Prefix for compiler variables (either BUILD_ or nothing). AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS], [ - # These flags are required for GCC 6 builds as undefined behavior in OpenJDK code - # runs afoul of the more aggressive versions of these optimizations. - # Notably, value range propagation now assumes that the this pointer of C++ - # member functions is non-null. - NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks" - FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG], - PREFIX: $2, IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""]) + # This flag is required for GCC 6 builds as undefined behavior in OpenJDK code + # runs afoul of the more aggressive versions of this optimization. NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse" FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG], PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""]) - $1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}" + $1_GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}" ]) AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],