From daebf5caf89969e99331896f4d285bb7bfa5e198 Mon Sep 17 00:00:00 2001 From: lukebroskop Date: Fri, 7 May 2021 19:16:13 -0500 Subject: [PATCH] craype fix for pdt (#23505) * craype fix for pdt adapt the pdt package for cce * fix style issues --- .../builtin/packages/pdt/cray_configure.patch | 14 ++++++++++++++ var/spack/repos/builtin/packages/pdt/package.py | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/pdt/cray_configure.patch diff --git a/var/spack/repos/builtin/packages/pdt/cray_configure.patch b/var/spack/repos/builtin/packages/pdt/cray_configure.patch new file mode 100644 index 0000000000..1c6a4a373d --- /dev/null +++ b/var/spack/repos/builtin/packages/pdt/cray_configure.patch @@ -0,0 +1,14 @@ +--- a/configure 2019-05-13 21:57:59.000000000 -0500 ++++ b/configure 2021-03-04 10:09:56.612397173 -0600 +@@ -98,6 +98,11 @@ + ARCH=CRAYXMT + PLATFORM=crayxmt + echo "Looks like a Cray XMT machine..." ++ elif [ -r /opt/cray ] ++ then ++ ARCH=CRAY ++ PLATFORM=x86_64 ++ echo "Looks like a Cray machine..." + else + ARCH=X86_64 + PLATFORM=x86_64 diff --git a/var/spack/repos/builtin/packages/pdt/package.py b/var/spack/repos/builtin/packages/pdt/package.py index 2322251e87..32678012f6 100644 --- a/var/spack/repos/builtin/packages/pdt/package.py +++ b/var/spack/repos/builtin/packages/pdt/package.py @@ -32,6 +32,8 @@ class Pdt(AutotoolsPackage): variant('pic', default=False, description="Builds with pic") + patch('cray_configure.patch', when='%cce') + def patch(self): spec = self.spec if spec.satisfies('%clang') or spec.satisfies('%apple-clang'): @@ -50,6 +52,8 @@ def configure(self, spec, prefix): options.append('-GNU') elif self.compiler.name == 'clang': options.append('-clang') + elif self.compiler.name == 'cce': + options.append('-CC') else: raise InstallError('Unknown/unsupported compiler family')