See also: https://github.com/archspec/archspec/issues/102 diff --git a/lib/spack/external/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py index a7cc4481f6..cadd593ca2 100644 --- a/lib/spack/external/archspec/cpu/detect.py +++ b/lib/spack/external/archspec/cpu/detect.py @@ -92,7 +92,8 @@ def _machine(): # If we are not on Darwin, trust what Python tells us if operating_system != "Darwin": - return platform.machine() + machine = platform.machine() + return TARGETS[machine].family.name if machine in TARGETS else machine # On Darwin it might happen that we are on M1, but using an interpreter # built for x86_64. In that case "platform.machine() == 'x86_64'", so we