mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
meson: Correctly handle endianness for PowerPC CPU families
I've missed this while reviewing 6db6190002.
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.
This commit is contained in:
parent
e2b0ff18f8
commit
ebd311b7b7
1 changed files with 7 additions and 6 deletions
|
|
@ -1,9 +1,10 @@
|
|||
nix_system_cpu = {
|
||||
'ppc64' : 'powerpc64',
|
||||
'ppc64le' : 'powerpc64le',
|
||||
'ppc' : 'powerpc',
|
||||
'ppcle' : 'powerpcle',
|
||||
}.get(
|
||||
powerpc_system_cpus = [ 'ppc64', 'ppc' ]
|
||||
|
||||
nix_system_cpu = {'ppc64' : 'powerpc64', 'ppc' : 'powerpc'}.get(
|
||||
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