From 9576546b9c0f22b0784c4f845f2694050cae2f16 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Mon, 25 Nov 2024 07:57:13 +0000 Subject: [PATCH] 8343698: Linux x86_64 lto build gives a lot of warnings and fails lto-wrapper: fatal error: make returned 2 exit status Reviewed-by: ihse, jwaters --- make/hotspot/lib/JvmOverrideFiles.gmk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk index 63169b4d672..6a513e10c61 100644 --- a/make/hotspot/lib/JvmOverrideFiles.gmk +++ b/make/hotspot/lib/JvmOverrideFiles.gmk @@ -37,6 +37,10 @@ ifeq ($(TOOLCHAIN_TYPE), gcc) # Need extra inlining to collapse shared marking code into the hot marking loop BUILD_LIBJVM_shenandoahMark.cpp_CXXFLAGS := --param inline-unit-growth=1000 endif + # disable lto in g1ParScanThreadState because of special inlining/flattening used there + ifeq ($(call check-jvm-feature, link-time-opt), true) + BUILD_LIBJVM_g1ParScanThreadState.cpp_CXXFLAGS := -fno-lto + endif endif LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)