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')