mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8345627: [REDO] Use gcc12 -ftrivial-auto-var-init=pattern in debug builds
Reviewed-by: erikj, kbarrett
This commit is contained in:
parent
1f10ffba88
commit
fae37aaae8
@ -482,6 +482,16 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
else
|
||||
DEBUG_CFLAGS_JDK="-DDEBUG"
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
INIT_PATTERN_FLAG="-ftrivial-auto-var-init=pattern"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_PATTERN_FLAG],
|
||||
IF_TRUE: [
|
||||
DEBUG_CFLAGS_JDK="$DEBUG_CFLAGS_JDK $INIT_PATTERN_FLAG"
|
||||
DEBUG_CFLAGS_JVM="$INIT_PATTERN_FLAG"
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang && test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DEBUG_CFLAGS_JVM="-fpic -mcmodel=large"
|
||||
fi
|
||||
|
||||
@ -104,6 +104,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
||||
undef stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_test_metaspace_misc.cpp := unused-const-variable, \
|
||||
DISABLED_WARNINGS_gcc_test_threadCpuLoad.cpp := address, \
|
||||
DISABLED_WARNINGS_gcc_test_tribool.cpp := uninitialized, \
|
||||
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang) \
|
||||
undef switch format-nonliteral tautological-undefined-compare \
|
||||
self-assign-overloaded, \
|
||||
|
||||
@ -53,6 +53,7 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, riscv64)+$(INCLUDE_COMPILER2
|
||||
DISABLED_WARNINGS_gcc := unused-function sign-compare tautological-compare ignored-qualifiers, \
|
||||
DISABLED_WARNINGS_clang := unused-function sign-compare tautological-compare ignored-qualifiers, \
|
||||
CFLAGS := -march=rv64gcv, \
|
||||
CFLAGS_FILTER_OUT := -ftrivial-auto-var-init=pattern, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSLEEF)
|
||||
@ -67,6 +68,7 @@ ifeq ($(call isTargetOs, linux)+$(call isTargetCpu, aarch64)+$(INCLUDE_COMPILER2
|
||||
DISABLED_WARNINGS_gcc := unused-function sign-compare tautological-compare ignored-qualifiers, \
|
||||
DISABLED_WARNINGS_clang := unused-function sign-compare tautological-compare ignored-qualifiers, \
|
||||
vector_math_sve.c_CFLAGS := $(SVE_CFLAGS), \
|
||||
CFLAGS_FILTER_OUT := -ftrivial-auto-var-init=pattern, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSLEEF)
|
||||
|
||||
@ -283,7 +283,7 @@ get_thread_info(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread) {
|
||||
|
||||
static jint
|
||||
get_thread_state(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread) {
|
||||
jint thread_state;
|
||||
jint thread_state = 0;
|
||||
jvmtiError err = jvmti->GetThreadState(thread, &thread_state);
|
||||
check_jvmti_status(jni, err, "get_thread_state: error in JVMTI GetThreadState call");
|
||||
return thread_state;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user