mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
meson: Correctly handle endianness for PowerPC CPU families
I've missed this while reviewing6db6190002. I only built big endian ppc64, so that didn't occur to me. From meson manual: > Those porting from autotools should note that Meson does not add > endianness to the name of the cpu_family. For example, autotools will > call little endian PPC64 "ppc64le", Meson will not, you must also check > the .endian() value of the machine for this information. This code should handle that correctly. (cherry picked from commitebd311b7b7)
This commit is contained in:
parent
f5dfd9a4a4
commit
14a5e2a4a3
1 changed files with 7 additions and 6 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
nix_system_cpu = {
|
powerpc_system_cpus = [ 'ppc64', 'ppc' ]
|
||||||
'ppc64' : 'powerpc64',
|
|
||||||
'ppc64le' : 'powerpc64le',
|
nix_system_cpu = {'ppc64' : 'powerpc64', 'ppc' : 'powerpc'}.get(
|
||||||
'ppc' : 'powerpc',
|
|
||||||
'ppcle' : 'powerpcle',
|
|
||||||
}.get(
|
|
||||||
host_machine.cpu_family(),
|
host_machine.cpu_family(),
|
||||||
host_machine.cpu_family(),
|
host_machine.cpu_family(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if powerpc_system_cpus.contains(host_machine.cpu_family()) and host_machine.endian() == 'little'
|
||||||
|
nix_system_cpu += 'le'
|
||||||
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue