Skip to content

Commit 7045581

Browse files
author
SendaoYan
committed
8316893: Compile without -fno-delete-null-pointer-checks
Backport-of: 287b24322135b54641f013970c4545ce069c4350
1 parent bc4abb4 commit 7045581

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

make/autoconf/flags-cflags.m4

+3-17
Original file line numberDiff line numberDiff line change
@@ -862,15 +862,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
862862
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
863863
864864
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
865-
elif test "x$TOOLCHAIN_TYPE" = xclang; then
866-
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
867-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
868-
PREFIX: $3,
869-
IF_FALSE: [
870-
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=
871-
]
872-
)
873-
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
874865
fi
875866
876867
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -1008,17 +999,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
1008999
# $2 - Prefix for compiler variables (either BUILD_ or nothing).
10091000
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
10101001
[
1011-
# These flags are required for GCC 6 builds as undefined behavior in OpenJDK code
1012-
# runs afoul of the more aggressive versions of these optimizations.
1013-
# Notably, value range propagation now assumes that the this pointer of C++
1014-
# member functions is non-null.
1015-
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
1016-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
1017-
PREFIX: $2, IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
1002+
# This flag is required for GCC 6 builds as undefined behavior in OpenJDK code
1003+
# runs afoul of the more aggressive versions of this optimization.
10181004
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
10191005
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG],
10201006
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
1021-
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
1007+
$1_GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}"
10221008
])
10231009

10241010
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],

0 commit comments

Comments
 (0)