From 39139b9db8685528cc09c46c96138cc8536f0496 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Wed, 24 Jul 2019 06:47:28 +0900 Subject: [PATCH] nanoflann: Don't add -mtune=native on ARM and gcc 5.x (#12093) --- var/spack/repos/builtin/packages/nanoflann/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/nanoflann/package.py b/var/spack/repos/builtin/packages/nanoflann/package.py index dd557ac4bc..88f3a64513 100644 --- a/var/spack/repos/builtin/packages/nanoflann/package.py +++ b/var/spack/repos/builtin/packages/nanoflann/package.py @@ -15,6 +15,10 @@ class Nanoflann(CMakePackage): version('1.2.3', '92a0f44a631c41aa06f9716c51dcdb11') + def patch(self): + if self.spec.satisfies('target=aarch64 %gcc@:5.9'): + filter_file('-mtune=native', '', 'CMakeLists.txt') + def cmake_args(self): args = ['-DBUILD_SHARED_LIBS=ON'] return args