Skip to content

Commit 636a82a

Browse files
author
Rakeshwar Reddy Kambaiahgari
committed
Gcc15Workaround
1 parent 08d1fc1 commit 636a82a

5 files changed

Lines changed: 29 additions & 1 deletion

File tree

src/VirtualClient/VirtualClient.Actions/SPECcpu/SpecCpuExecutor.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ private async Task WriteSpecCpuConfigAsync(CancellationToken cancellationToken)
489489
SpecCpuConfigPlaceHolder.Gcc10Workaround,
490490
Convert.ToInt32(compilerVersion) >= 10 ? SpecCpuConfigPlaceHolder.Gcc10WorkaroundContent : string.Empty,
491491
StringComparison.OrdinalIgnoreCase);
492+
493+
templateText = templateText.Replace(
494+
SpecCpuConfigPlaceHolder.Gcc15Workaround,
495+
Convert.ToInt32(compilerVersion) >= 15 ? SpecCpuConfigPlaceHolder.Gcc15WorkaroundContent : string.Empty,
496+
StringComparison.OrdinalIgnoreCase);
492497
}
493498
else
494499
{
@@ -501,6 +506,11 @@ private async Task WriteSpecCpuConfigAsync(CancellationToken cancellationToken)
501506
SpecCpuConfigPlaceHolder.Gcc10Workaround,
502507
SpecCpuConfigPlaceHolder.Gcc10WorkaroundContent,
503508
StringComparison.OrdinalIgnoreCase);
509+
510+
templateText = templateText.Replace(
511+
SpecCpuConfigPlaceHolder.Gcc15Workaround,
512+
SpecCpuConfigPlaceHolder.Gcc15WorkaroundContent,
513+
StringComparison.OrdinalIgnoreCase);
504514
}
505515

506516
templateText = templateText.Replace(
@@ -572,6 +582,8 @@ private static class SpecCpuConfigPlaceHolder
572582
public const string PeakOptimizingFlags = "$PeakOptimizingFlags$";
573583
public const string Gcc10Workaround = "$Gcc10Workaround$";
574584
public const string Gcc10WorkaroundContent = "%define GCCge10";
585+
public const string Gcc15Workaround = "$Gcc15Workaround$";
586+
public const string Gcc15WorkaroundContent = "%define GCCge15";
575587
}
576588
}
577589
}

src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64-jemalloc.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ default:
164164
# line to avoid compile errors for several FP benchmarks
165165
#
166166
%define GCCge10 # EDIT: remove the '#' from column 1 if using GCC 10 or later
167+
%define GCCge15 # EDIT: remove the '#' from column 1 if using GCC 15 or later
167168

168169
# EDIT if needed: the preENV line adds library directories to the runtime
169170
# path. You can adjust it, or add lines for other environment variables.
@@ -318,6 +319,9 @@ default: # data model applies to all benchmarks
318319
#
319320
default=base: # flags for all base
320321
OPTIMIZE = -g -O3 -mcpu=native
322+
% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later)
323+
EXTRA_CXXFLAGS = -Wno-error=template-body
324+
% endif
321325

322326

323327
#-------- Peak Tuning Flags ----------------------------------------------

src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-arm64.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ default:
164164
# line to avoid compile errors for several FP benchmarks
165165
#
166166
$Gcc10Workaround$ # EDIT: remove the '#' from column 1 if using GCC 10 or later
167+
$Gcc15Workaround$ # workaround for GCC v15 (and presumably later)
167168

168169
# EDIT if needed: the preENV line adds library directories to the runtime
169170
# path. You can adjust it, or add lines for other environment variables.
@@ -314,6 +315,9 @@ default: # data model applies to all benchmarks
314315
#
315316
default=base: # flags for all base
316317
OPTIMIZE = $BaseOptimizingFlags$
318+
% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later)
319+
EXTRA_CXXFLAGS = -Wno-error=template-body
320+
% endif
317321

318322

319323
#-------- Peak Tuning Flags ----------------------------------------------

src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64-jemalloc.cfg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ default:
158158
# line to avoid compile errors for several FP benchmarks
159159
#
160160
%define GCCge10 # EDIT: remove the '#' from column 1 if using GCC 10 or later
161+
%define GCCge15 # EDIT: remove the '#' from column 1 if using GCC 15 or later
161162

162163
# EDIT if needed: the preENV line adds library directories to the runtime
163164
# path. You can adjust it, or add lines for other environment variables.
@@ -300,7 +301,10 @@ fpspeed:
300301
# the -march=native. See topic "Older GCC" above.
301302
#
302303
default=base: # flags for all base
303-
OPTIMIZE = -g -O3 -march=native
304+
OPTIMIZE = -g -O3 -march=native
305+
% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later)
306+
EXTRA_CXXFLAGS = -Wno-error=template-body
307+
% endif
304308

305309

306310
#-------- Peak Tuning Flags ----------------------------------------------

src/VirtualClient/VirtualClient.Actions/SPECcpu/vc-linux-x64.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ default:
158158
# line to avoid compile errors for several FP benchmarks
159159
#
160160
$Gcc10Workaround$ # EDIT: remove the '#' from column 1 if using GCC 10 or later
161+
$Gcc15Workaround$ # workaround for GCC v15 (and presumably later)
161162

162163
# EDIT if needed: the preENV line adds library directories to the runtime
163164
# path. You can adjust it, or add lines for other environment variables.
@@ -297,6 +298,9 @@ fpspeed:
297298
#
298299
default=base: # flags for all base
299300
OPTIMIZE = $BaseOptimizingFlags$
301+
% ifdef %{GCCge15} # workaround for GCC v15 (and presumably later)
302+
EXTRA_CXXFLAGS = -Wno-error=template-body
303+
% endif
300304

301305

302306
#-------- Peak Tuning Flags ----------------------------------------------

0 commit comments

Comments
 (0)