summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark W. Krentel <krentel@rice.edu>2021-04-22 20:07:13 -0500
committerGitHub <noreply@github.com>2021-04-22 19:07:13 -0600
commit09028f7407f3aceeb81f882d53d5bd003e63c86c (patch)
tree439d01e9bb0079cd9dd44d847fc60067e7231bb9
parent010e5761d6631eae102d1eec87e5e74a0e16ed82 (diff)
downloadspack-09028f7407f3aceeb81f882d53d5bd003e63c86c.tar.gz
spack-09028f7407f3aceeb81f882d53d5bd003e63c86c.tar.bz2
spack-09028f7407f3aceeb81f882d53d5bd003e63c86c.tar.xz
spack-09028f7407f3aceeb81f882d53d5bd003e63c86c.zip
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.
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/gcc10-enum.patch15
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/package.py8
2 files changed, 17 insertions, 6 deletions
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