From 09028f7407f3aceeb81f882d53d5bd003e63c86c Mon Sep 17 00:00:00 2001 From: "Mark W. Krentel" Date: Thu, 22 Apr 2021 20:07:13 -0500 Subject: hpctoolkit: fix patch from #22864 (#23149) PR #22864 added a patch to hpctoolkit to fix an issue with gcc 10.x, and the patch was applied to all revs unconditionally. But this was fixed in hpctoolkit master on Aug 11, 2020, so the patch should only apply to old revs. Fixes #22951. --- .../repos/builtin/packages/hpctoolkit/gcc10-enum.patch | 15 +++++++++++++++ var/spack/repos/builtin/packages/hpctoolkit/package.py | 8 ++------ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/hpctoolkit/gcc10-enum.patch diff --git a/var/spack/repos/builtin/packages/hpctoolkit/gcc10-enum.patch b/var/spack/repos/builtin/packages/hpctoolkit/gcc10-enum.patch new file mode 100644 index 0000000000..c2ae786c3e --- /dev/null +++ b/var/spack/repos/builtin/packages/hpctoolkit/gcc10-enum.patch @@ -0,0 +1,15 @@ +See: https://github.com/HPCToolkit/hpctoolkit/issues/309 + +diff --git a/src/tool/hpcrun/gpu/gpu-metrics.h b/src/tool/hpcrun/gpu/gpu-metrics.h +index ea0958156..fa3bceab1 100644 +--- a/src/tool/hpcrun/gpu/gpu-metrics.h ++++ b/src/tool/hpcrun/gpu/gpu-metrics.h +@@ -61,7 +61,7 @@ + //***************************************************************************** + + +-enum { ++typedef enum { + GPU_INST_STALL_ANY = 0 + } gpu_inst_stall_all_t; + diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index d08e02d35f..83289b4f46 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -113,12 +113,8 @@ class Hpctoolkit(AutotoolsPackage): conflicts('^binutils@2.35:2.35.1', msg='avoid binutils 2.35 and 2.35.1 (spews errors)') - # Fixes multiple definition error with GCC 10. - # https://github.com/HPCToolkit/hpctoolkit/issues/309 - patch('https://github.com/blue42u/hpctoolkit/commit/' - 'b3f6f9e4846d9256cf0d841465ff89d78c6bf422.patch', - when='%gcc@10', - sha256='f8507c3ce9672c70c2db9f9deb5766c8120ea06e20866d0f553a17866e810b91') + # Fix the build for old revs with gcc 10.x. + patch('gcc10-enum.patch', when='@2020.01.01:2020.08.99 %gcc@10.0:') flag_handler = AutotoolsPackage.build_system_flags -- cgit v1.2.3-60-g2f50