summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2019-10-03 10:31:03 +0200
committerGitHub <noreply@github.com>2019-10-03 10:31:03 +0200
commit78577c0a90d79a22634644370e2e1f0f9cf138c7 (patch)
tree715068c09d39f64528f2ccf957517aee4b966e4e /lib
parent76b9c561109e4a19375231fd6e8fd8a1c7947f34 (diff)
downloadspack-78577c0a90d79a22634644370e2e1f0f9cf138c7.tar.gz
spack-78577c0a90d79a22634644370e2e1f0f9cf138c7.tar.bz2
spack-78577c0a90d79a22634644370e2e1f0f9cf138c7.tar.xz
spack-78577c0a90d79a22634644370e2e1f0f9cf138c7.zip
Generic x86_64 code compiled with GCC uses non deprecated mtune flags (#13022)
fixes #12928
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/llnl/util/cpu/microarchitectures.json17
-rw-r--r--lib/spack/spack/test/llnl/util/cpu.py4
2 files changed, 15 insertions, 6 deletions
diff --git a/lib/spack/llnl/util/cpu/microarchitectures.json b/lib/spack/llnl/util/cpu/microarchitectures.json
index 2e20cc98f8..ad985ba994 100644
--- a/lib/spack/llnl/util/cpu/microarchitectures.json
+++ b/lib/spack/llnl/util/cpu/microarchitectures.json
@@ -49,11 +49,18 @@
"vendor": "generic",
"features": [],
"compilers": {
- "gcc": {
- "versions": "4:",
- "name": "x86-64",
- "flags": "-march={name} -mtune={name}"
- }
+ "gcc": [
+ {
+ "versions": "4.2.0:",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune=generic"
+ },
+ {
+ "versions": "4.0:4.1.2",
+ "name": "x86-64",
+ "flags": "-march={name} -mtune={name}"
+ }
+ ]
}
},
"nocona": {
diff --git a/lib/spack/spack/test/llnl/util/cpu.py b/lib/spack/spack/test/llnl/util/cpu.py
index 836514cc3c..9af784d103 100644
--- a/lib/spack/spack/test/llnl/util/cpu.py
+++ b/lib/spack/spack/test/llnl/util/cpu.py
@@ -190,7 +190,9 @@ def test_target_json_schema():
@pytest.mark.parametrize('target_name,compiler,version,expected_flags', [
- ('x86_64', 'gcc', '4.9.3', '-march=x86-64 -mtune=x86-64'),
+ ('x86_64', 'gcc', '4.9.3', '-march=x86-64 -mtune=generic'),
+ ('x86_64', 'gcc', '4.2.0', '-march=x86-64 -mtune=generic'),
+ ('x86_64', 'gcc', '4.1.1', '-march=x86-64 -mtune=x86-64'),
('nocona', 'gcc', '4.9.3', '-march=nocona -mtune=nocona'),
('nehalem', 'gcc', '4.9.3', '-march=nehalem -mtune=nehalem'),
('nehalem', 'gcc', '4.8.5', '-march=corei7 -mtune=corei7'),