Skip to content

Commit 287b243

Browse files
committedOct 3, 2023
8316893: Compile without -fno-delete-null-pointer-checks
Reviewed-by: kbarrett, erikj
1 parent 26c21f5 commit 287b243

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
@@ -799,15 +799,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
799799
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
800800
801801
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
802-
elif test "x$TOOLCHAIN_TYPE" = xclang; then
803-
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
804-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
805-
PREFIX: $3,
806-
IF_FALSE: [
807-
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=
808-
]
809-
)
810-
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
811802
fi
812803
813804
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
@@ -929,17 +920,12 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
929920
# $2 - Prefix for compiler variables (either BUILD_ or nothing).
930921
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
931922
[
932-
# These flags are required for GCC 6 builds as undefined behavior in OpenJDK code
933-
# runs afoul of the more aggressive versions of these optimizations.
934-
# Notably, value range propagation now assumes that the this pointer of C++
935-
# member functions is non-null.
936-
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
937-
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
938-
PREFIX: $2, IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
923+
# This flag is required for GCC 6 builds as undefined behavior in OpenJDK code
924+
# runs afoul of the more aggressive versions of this optimization.
939925
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
940926
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG],
941927
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
942-
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
928+
$1_GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}"
943929
])
944930

945931
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],

0 commit comments

Comments
 (0)
Please sign in to comment.