Generic x86_64 code compiled with GCC uses non deprecated mtune flags (#13022)

fixes #12928
This commit is contained in:
Massimiliano Culpo 2019-10-03 10:31:03 +02:00 committed by GitHub
parent 76b9c56110
commit 78577c0a90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View file

@ -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": {

View file

@ -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'),