diff --git a/var/spack/repos/builtin/packages/hipfort/package.py b/var/spack/repos/builtin/packages/hipfort/package.py index e6bb9d07eb..0231fd6f56 100644 --- a/var/spack/repos/builtin/packages/hipfort/package.py +++ b/var/spack/repos/builtin/packages/hipfort/package.py @@ -97,6 +97,8 @@ class Hipfort(CMakePackage): depends_on("rocm-cmake@3.8.0:", type="build") + depends_on("binutils", when="%cce") + for ver in [ "3.8.0", "3.9.0", @@ -131,4 +133,12 @@ def cmake_args(self): if self.spec.satisfies("^cmake@3.21.0:3.21.2"): args.append(self.define("__skip_rocmclang", "ON")) + if self.spec.satisfies("%cce"): + args.append("-DHIPFORT_COMPILER={}".format(spack_fc)) + args.append("-DHIPFORT_AR=" + join_path(self.spec["binutils"].prefix.bin, "ar")) + args.append( + "-DHIPFORT_RANLIB=" + join_path(self.spec["binutils"].prefix.bin, "ranlib") + ) + args.append("-DHIPFORT_COMPILER_FLAGS='-ffree -eT'") + return args