From 636a82af5034dfbf1414528966d82d66342420f6 Mon Sep 17 00:00:00 2001 From: Rakeshwar Reddy Kambaiahgari Date: Fri, 10 Apr 2026 13:06:27 -0700 Subject: [PATCH] Gcc15Workaround --- .../VirtualClient.Actions/SPECcpu/SpecCpuExecutor.cs | 12 ++++++++++++ .../SPECcpu/vc-linux-arm64-jemalloc.cfg | 4 ++++ .../VirtualClient.Actions/SPECcpu/vc-linux-arm64.cfg | 4 ++++ .../SPECcpu/vc-linux-x64-jemalloc.cfg | 6 +++++- .../VirtualClient.Actions/SPECcpu/vc-linux-x64.cfg | 4 ++++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/VirtualClient/VirtualClient.Actions/SPECcpu/SpecCpuExecutor.cs b/src/VirtualClient/VirtualClient.Actions/SPECcpu/SpecCpuExecutor.cs index bdc2a74bba..700d3486bd 100644 --- a/src/VirtualClient/VirtualClient.Actions/SPECcpu/SpecCpuExecutor.cs +++ b/src/VirtualClient/VirtualClient.Actions/SPECcpu/SpecCpuExecutor.cs @@ -489,6 +489,11 @@ private async Task WriteSpecCpuConfigAsync(CancellationToken cancellationToken) SpecCpuConfigPlaceHolder.Gcc10Workaround, Convert.ToInt32(compilerVersion) >= 10 ? SpecCpuConfigPlaceHolder.Gcc10WorkaroundContent : string.Empty, StringComparison.OrdinalIgnoreCase); + + templateText = templateText.Replace( + SpecCpuConfigPlaceHolder.Gcc15Workaround, + Convert.ToInt32(compilerVersion) >= 15 ? SpecCpuConfigPlaceHolder.Gcc15WorkaroundContent : string.Empty, + StringComparison.OrdinalIgnoreCase); } else { @@ -501,6 +506,11 @@ private async Task WriteSpecCpuConfigAsync(CancellationToken cancellationToken) SpecCpuConfigPlaceHolder.Gcc10Workaround, SpecCpuConfigPlaceHolder.Gcc10WorkaroundContent, StringComparison.OrdinalIgnoreCase); + + templateText = templateText.Replace( + SpecCpuConfigPlaceHolder.Gcc15Workaround, + SpecCpuConfigPlaceHolder.Gcc15WorkaroundContent, + StringComparison.OrdinalIgnoreCase); } templateText = templateText.Replace( @@ -572,6 +582,8 @@ private static class SpecCpuConfigPlaceHolder public const string PeakOptimizingFlags = "$PeakOptimizingFlags$"; public const string Gcc10Workaround = "$Gcc10Workaround$"; public const string Gcc10WorkaroundContent = "%define GCCge10"; + public const string Gcc15Workaround = "$Gcc15Workaround$"; + public const string Gcc15WorkaroundContent = "%define GCCge15"; } } } \ No newline at end of file diff --git a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64-jemalloc.cfg b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64-jemalloc.cfg index 0df8e515fc..e4fadac2dc 100644 --- a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64-jemalloc.cfg +++ b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64-jemalloc.cfg @@ -164,6 +164,7 @@ default: # line to avoid compile errors for several FP benchmarks # %define GCCge10 # EDIT: remove the '#' from column 1 if using GCC 10 or later +%define GCCge15 # EDIT: remove the '#' from column 1 if using GCC 15 or later # EDIT if needed: the preENV line adds library directories to the runtime # path. You can adjust it, or add lines for other environment variables. @@ -318,6 +319,9 @@ default: # data model applies to all benchmarks # default=base: # flags for all base OPTIMIZE = -g -O3 -mcpu=native +% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later) + EXTRA_CXXFLAGS = -Wno-error=template-body +% endif #-------- Peak Tuning Flags ---------------------------------------------- diff --git a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64.cfg b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64.cfg index 7bf22fa800..ee005f77b1 100644 --- a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64.cfg +++ b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64.cfg @@ -164,6 +164,7 @@ default: # line to avoid compile errors for several FP benchmarks # $Gcc10Workaround$ # EDIT: remove the '#' from column 1 if using GCC 10 or later +$Gcc15Workaround$ # workaround for GCC v15 (and presumably later) # EDIT if needed: the preENV line adds library directories to the runtime # path. You can adjust it, or add lines for other environment variables. @@ -314,6 +315,9 @@ default: # data model applies to all benchmarks # default=base: # flags for all base OPTIMIZE = $BaseOptimizingFlags$ +% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later) + EXTRA_CXXFLAGS = -Wno-error=template-body +% endif #-------- Peak Tuning Flags ---------------------------------------------- diff --git a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64-jemalloc.cfg b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64-jemalloc.cfg index 9ecb11dc07..6d54238ce3 100644 --- a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64-jemalloc.cfg +++ b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64-jemalloc.cfg @@ -158,6 +158,7 @@ default: # line to avoid compile errors for several FP benchmarks # %define GCCge10 # EDIT: remove the '#' from column 1 if using GCC 10 or later +%define GCCge15 # EDIT: remove the '#' from column 1 if using GCC 15 or later # EDIT if needed: the preENV line adds library directories to the runtime # path. You can adjust it, or add lines for other environment variables. @@ -300,7 +301,10 @@ fpspeed: # the -march=native. See topic "Older GCC" above. # default=base: # flags for all base - OPTIMIZE = -g -O3 -march=native + OPTIMIZE = -g -O3 -march=native +% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later) + EXTRA_CXXFLAGS = -Wno-error=template-body +% endif #-------- Peak Tuning Flags ---------------------------------------------- diff --git a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64.cfg b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64.cfg index d342539e05..73e1608624 100644 --- a/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64.cfg +++ b/src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64.cfg @@ -158,6 +158,7 @@ default: # line to avoid compile errors for several FP benchmarks # $Gcc10Workaround$ # EDIT: remove the '#' from column 1 if using GCC 10 or later +$Gcc15Workaround$ # workaround for GCC v15 (and presumably later) # EDIT if needed: the preENV line adds library directories to the runtime # path. You can adjust it, or add lines for other environment variables. @@ -297,6 +298,9 @@ fpspeed: # default=base: # flags for all base OPTIMIZE = $BaseOptimizingFlags$ +% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later) + EXTRA_CXXFLAGS = -Wno-error=template-body +% endif #-------- Peak Tuning Flags ----------------------------------------------