From 58c84423b1b7433caa1a48460265681c06c38e68 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Tue, 23 Jul 2019 03:03:43 +0900 Subject: [PATCH] tealeaf: Don't add -march=native on ARM and gcc 5.x or before. (#12080) --- var/spack/repos/builtin/packages/tealeaf/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/tealeaf/package.py b/var/spack/repos/builtin/packages/tealeaf/package.py index 3c75f6e376..439b708ed0 100644 --- a/var/spack/repos/builtin/packages/tealeaf/package.py +++ b/var/spack/repos/builtin/packages/tealeaf/package.py @@ -24,6 +24,12 @@ class Tealeaf(MakefilePackage): depends_on('mpi') + def edit(self, spec, prefix): + if (spec.satisfies('target=aarch64 %gcc@:5.9')): + filter_file( + '-march=native', '', join_path('TeaLeaf_ref', 'Makefile') + ) + @property def build_targets(self): targets = [