Merge pull request #61019 from volth/gcc.arch-amd
platform.gcc.arch: support for AMD CPUs
This commit is contained in:
@@ -255,18 +255,18 @@ stdenv.mkDerivation {
|
||||
"-no-warnings-are-errors"
|
||||
]
|
||||
++ (
|
||||
if (!stdenv.hostPlatform.isx86_64)
|
||||
then [ "-no-sse2" ]
|
||||
else lib.optionals (compareVersion "5.9.0" >= 0) {
|
||||
default = [ "-sse2" "-no-sse3" "-no-ssse3" "-no-sse4.1" "-no-sse4.2" "-no-avx" "-no-avx2" ];
|
||||
westmere = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-no-avx" "-no-avx2" ];
|
||||
sandybridge = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-no-avx2" ];
|
||||
ivybridge = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-no-avx2" ];
|
||||
haswell = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ];
|
||||
broadwell = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ];
|
||||
skylake = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ];
|
||||
skylake-avx512 = [ "-sse2" "-sse3" "-ssse3" "-sse4.1" "-sse4.2" "-avx" "-avx2" ];
|
||||
}.${stdenv.hostPlatform.platform.gcc.arch or "default"}
|
||||
if (!stdenv.hostPlatform.isx86_64) then [
|
||||
"-no-sse2"
|
||||
] else if (compareVersion "5.9.0" >= 0) then [
|
||||
"-sse2"
|
||||
"${if stdenv.hostPlatform.sse3Support then "" else "-no"}-sse3"
|
||||
"${if stdenv.hostPlatform.ssse3Support then "" else "-no"}-ssse3"
|
||||
"${if stdenv.hostPlatform.sse4_1Support then "" else "-no"}-sse4.1"
|
||||
"${if stdenv.hostPlatform.sse4_2Support then "" else "-no"}-sse4.2"
|
||||
"${if stdenv.hostPlatform.avxSupport then "" else "-no"}-avx"
|
||||
"${if stdenv.hostPlatform.avx2Support then "" else "-no"}-avx2"
|
||||
] else [
|
||||
]
|
||||
)
|
||||
++ [
|
||||
"-no-mips_dsp"
|
||||
|
||||
Reference in New Issue
Block a user