diff --git a/var/spack/repos/builtin/packages/cp2k/package.py b/var/spack/repos/builtin/packages/cp2k/package.py index 3674ac9c1c..23edfd10b2 100644 --- a/var/spack/repos/builtin/packages/cp2k/package.py +++ b/var/spack/repos/builtin/packages/cp2k/package.py @@ -160,7 +160,6 @@ def edit(self, spec, prefix): optimization_flags = { 'gcc': [ '-O2', - '-mtune=native', '-funroll-loops', '-ftree-vectorize', ], diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index eac2fc4892..109b67da2d 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -277,13 +277,10 @@ def cmake_args(self): # https://groups.google.com/forum/?fromgroups#!topic/dealii/3Yjy8CBIrgU if spec.satisfies('%gcc'): cxx_flags_release.extend(['-O3']) - cxx_flags.extend(['-march=native']) elif spec.satisfies('%intel'): cxx_flags_release.extend(['-O3']) - cxx_flags.extend(['-march=native']) elif spec.satisfies('%clang'): cxx_flags_release.extend(['-O3', '-ffp-contract=fast']) - cxx_flags.extend(['-march=native']) # Python bindings if spec.satisfies('@8.5.0:'): diff --git a/var/spack/repos/builtin/packages/elpa/package.py b/var/spack/repos/builtin/packages/elpa/package.py index d73371e93c..cc3f75a4c0 100644 --- a/var/spack/repos/builtin/packages/elpa/package.py +++ b/var/spack/repos/builtin/packages/elpa/package.py @@ -84,8 +84,8 @@ def configure_args(self): # adjust the C compiler or CFLAGS if '+optflags' in self.spec: options.extend([ - 'FCFLAGS=-O2 -march=native -ffree-line-length-none', - 'CFLAGS=-O2 -march=native' + 'FCFLAGS=-O2 -ffree-line-length-none', + 'CFLAGS=-O2' ]) if '+openmp' in self.spec: options.append('--enable-openmp') diff --git a/var/spack/repos/builtin/packages/hpgmg/package.py b/var/spack/repos/builtin/packages/hpgmg/package.py index 6807b79ae5..64d9fafa04 100644 --- a/var/spack/repos/builtin/packages/hpgmg/package.py +++ b/var/spack/repos/builtin/packages/hpgmg/package.py @@ -66,11 +66,6 @@ def configure_args(self): cflags.append('-g') elif any(map(self.spec.satisfies, ['%gcc', '%clang', '%intel'])): cflags.append('-O3') - if self.compiler.target in ['x86_64']: - cflags.append('-march=native') - elif not self.spec.satisfies('target=aarch64: %gcc@:5.9'): - cflags.append('-mcpu=native') - cflags.append('-mtune=native') else: cflags.append('-O3') diff --git a/var/spack/repos/builtin/packages/krims/package.py b/var/spack/repos/builtin/packages/krims/package.py index 640c2e82da..3a08b61820 100644 --- a/var/spack/repos/builtin/packages/krims/package.py +++ b/var/spack/repos/builtin/packages/krims/package.py @@ -58,8 +58,6 @@ def cmake_args(self): "-DAUTOCHECKOUT_MISSING_REPOS=OFF", # "-DBUILD_SHARED_LIBS=" + str("+shared" in spec), - "-DDRB_MACHINE_SPECIFIC_OPTIM_Release=ON", # Adds -march=native - # # TODO Hard-disable tests for now, since rapidcheck not in Spack "-DKRIMS_ENABLE_TESTS=OFF", "-DKRIMS_ENABLE_EXAMPLES=" + str("+examples" in spec), diff --git a/var/spack/repos/builtin/packages/lazyten/package.py b/var/spack/repos/builtin/packages/lazyten/package.py index 3ae9f2c88c..7a0061a656 100644 --- a/var/spack/repos/builtin/packages/lazyten/package.py +++ b/var/spack/repos/builtin/packages/lazyten/package.py @@ -71,8 +71,6 @@ def cmake_args(self): "-DAUTOCHECKOUT_MISSING_REPOS=OFF", # "-DBUILD_SHARED_LIBS=" + str("+shared" in spec), - "-DDRB_MACHINE_SPECIFIC_OPTIM_Release=ON", # Adds -march=native - # # TODO Hard-disable tests for now, since rapidcheck not in Spack "-DLAZYTEN_ENABLE_TESTS=OFF", "-DLAZYTEN_ENABLE_EXAMPLES=" + str("+examples" in spec), diff --git a/var/spack/repos/builtin/packages/libceed/package.py b/var/spack/repos/builtin/packages/libceed/package.py index 5eb11a6ef8..2991b5bc8b 100644 --- a/var/spack/repos/builtin/packages/libceed/package.py +++ b/var/spack/repos/builtin/packages/libceed/package.py @@ -62,10 +62,6 @@ def common_make_opts(self): opt = '-g' elif compiler.name == 'gcc': opt = '-O3 -g -ffp-contract=fast' - if compiler.target in ['x86_64']: - opt += ' -march=native' - elif compiler.target in ['ppc64le']: - opt += ' -mcpu=native -mtune=native' if compiler.version >= ver(4.9): opt += ' -fopenmp-simd' elif compiler.name == 'clang': diff --git a/var/spack/repos/builtin/packages/nanoflann/package.py b/var/spack/repos/builtin/packages/nanoflann/package.py index 2e5a259469..d2fe6f642b 100644 --- a/var/spack/repos/builtin/packages/nanoflann/package.py +++ b/var/spack/repos/builtin/packages/nanoflann/package.py @@ -16,9 +16,7 @@ class Nanoflann(CMakePackage): version('1.2.3', '92a0f44a631c41aa06f9716c51dcdb11') def patch(self): - if self.spec.target.family == 'aarch64' and \ - self.spec.satisfies('%gcc@:5.9'): - filter_file('-mtune=native', '', 'CMakeLists.txt') + filter_file('-mtune=native', '', 'CMakeLists.txt') def cmake_args(self): args = ['-DBUILD_SHARED_LIBS=ON'] diff --git a/var/spack/repos/builtin/packages/rocksdb/package.py b/var/spack/repos/builtin/packages/rocksdb/package.py index 4d13393dde..e002c5b14e 100644 --- a/var/spack/repos/builtin/packages/rocksdb/package.py +++ b/var/spack/repos/builtin/packages/rocksdb/package.py @@ -35,12 +35,10 @@ class Rocksdb(MakefilePackage): phases = ['install'] def patch(self): - if (self.spec.target.family == 'aarch64' and - self.spec.satisfies('%gcc@:5.9')): - filter_file( - '-march=native', '', - join_path('build_tools', 'build_detect_platform') - ) + filter_file( + '-march=native', '', + join_path('build_tools', 'build_detect_platform') + ) def install(self, spec, prefix): cflags = [] diff --git a/var/spack/repos/builtin/packages/tealeaf/package.py b/var/spack/repos/builtin/packages/tealeaf/package.py index 49b13251af..4a720fa115 100644 --- a/var/spack/repos/builtin/packages/tealeaf/package.py +++ b/var/spack/repos/builtin/packages/tealeaf/package.py @@ -25,10 +25,7 @@ class Tealeaf(MakefilePackage): depends_on('mpi') def edit(self, spec, prefix): - if spec.target.family == 'aarch64' and spec.satisfies('%gcc@:5.9'): - filter_file( - '-march=native', '', join_path('TeaLeaf_ref', 'Makefile') - ) + filter_file('-march=native', '', join_path('TeaLeaf_ref', 'Makefile')) @property def build_targets(self): diff --git a/var/spack/repos/tutorial/packages/elpa/package.py b/var/spack/repos/tutorial/packages/elpa/package.py index 9ddae2b8b7..f8c4ca7873 100644 --- a/var/spack/repos/tutorial/packages/elpa/package.py +++ b/var/spack/repos/tutorial/packages/elpa/package.py @@ -65,13 +65,10 @@ def configure_args(self): # https://src.fedoraproject.org/cgit/rpms/elpa.git/ # https://packages.qa.debian.org/e/elpa.html options = [] - # without -march=native there is configure error for 2017.05.02 - # Could not compile test program, try with --disable-sse, or - # adjust the C compiler or CFLAGS if '+optflags' in self.spec: options.extend([ - 'FCFLAGS=-O2 -march=native -ffree-line-length-none', - 'CFLAGS=-O2 -march=native' + 'FCFLAGS=-O2 -ffree-line-length-none', + 'CFLAGS=-O2' ]) if '+openmp' in self.spec: options.append('--enable-openmp')