diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-tensorflow/package.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index c94a2082d5..e6e7dce487 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -452,6 +452,22 @@ class PyTensorflow(Package, CudaPackage, ROCmPackage, PythonExtension): ) phases = ["configure", "build", "install"] + def flag_handler(self, name, flags): + spec = self.spec + # ubuntu gcc has this workaround turned on by default in aarch64 + # and it causes issues with symbol relocation during link + # note, archspec doesn't currently ever report cortex_a53! + if ( + name == "ldflags" + and spec.target.family == "aarch64" + and "ubuntu" in spec.os + and spec.compiler.name == "gcc" + and "cortex_a53" not in spec.target.name + ): + flags.append("-mno-fix-cortex-a53-843419") + + return (flags, None, None) + # https://www.tensorflow.org/install/source def setup_build_environment(self, env): spec = self.spec |