mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
treewide: Fix Meson CPU names for powerpc CPUs
This commit is contained in:
parent
7e184bbc29
commit
6db6190002
5 changed files with 17 additions and 2 deletions
9
nix-meson-build-support/default-system-cpu/meson.build
Normal file
9
nix-meson-build-support/default-system-cpu/meson.build
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
nix_system_cpu = {
|
||||||
|
'ppc64' : 'powerpc64',
|
||||||
|
'ppc64le' : 'powerpc64le',
|
||||||
|
'ppc' : 'powerpc',
|
||||||
|
'ppcle' : 'powerpcle',
|
||||||
|
}.get(
|
||||||
|
host_machine.cpu_family(),
|
||||||
|
host_machine.cpu_family(),
|
||||||
|
)
|
||||||
|
|
@ -21,10 +21,12 @@ configdata_priv = configuration_data()
|
||||||
# TODO rename, because it will conflict with downstream projects
|
# TODO rename, because it will conflict with downstream projects
|
||||||
configdata_priv.set_quoted('PACKAGE_VERSION', meson.project_version())
|
configdata_priv.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/default-system-cpu')
|
||||||
|
|
||||||
# Used in public header.
|
# Used in public header.
|
||||||
configdata_pub.set_quoted(
|
configdata_pub.set_quoted(
|
||||||
'NIX_LOCAL_SYSTEM',
|
'NIX_LOCAL_SYSTEM',
|
||||||
host_machine.cpu_family() + '-' + host_machine.system(),
|
nix_system_cpu + '-' + host_machine.system(),
|
||||||
description :
|
description :
|
||||||
'This is the system name Nix expects for local running instance of Nix.\n\n'
|
'This is the system name Nix expects for local running instance of Nix.\n\n'
|
||||||
+ 'See the "system" setting for additional details',
|
+ 'See the "system" setting for additional details',
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ dot = find_program('dot', native : true, required : false)
|
||||||
|
|
||||||
nix_bin_dir = fs.parent(nix.full_path())
|
nix_bin_dir = fs.parent(nix.full_path())
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/default-system-cpu')
|
||||||
|
|
||||||
test_confdata = {
|
test_confdata = {
|
||||||
'bindir': nix_bin_dir,
|
'bindir': nix_bin_dir,
|
||||||
'coreutils': fs.parent(coreutils.full_path()),
|
'coreutils': fs.parent(coreutils.full_path()),
|
||||||
|
|
@ -30,7 +32,7 @@ test_confdata = {
|
||||||
'bash': bash.full_path(),
|
'bash': bash.full_path(),
|
||||||
'sandbox_shell': busybox.found() ? busybox.full_path() : '',
|
'sandbox_shell': busybox.found() ? busybox.full_path() : '',
|
||||||
'PACKAGE_VERSION': meson.project_version(),
|
'PACKAGE_VERSION': meson.project_version(),
|
||||||
'system': host_machine.cpu_family() + '-' + host_machine.system(),
|
'system': nix_system_cpu + '-' + host_machine.system(),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Just configures `common/vars-and-functions.sh.in`.
|
# Just configures `common/vars-and-functions.sh.in`.
|
||||||
|
|
|
||||||
1
tests/functional/nix-meson-build-support
Symbolic link
1
tests/functional/nix-meson-build-support
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../nix-meson-build-support
|
||||||
|
|
@ -39,6 +39,7 @@ mkMesonDerivation (
|
||||||
|
|
||||||
workDir = ./.;
|
workDir = ./.;
|
||||||
fileset = fileset.unions [
|
fileset = fileset.unions [
|
||||||
|
../../nix-meson-build-support
|
||||||
../../scripts/nix-profile.sh.in
|
../../scripts/nix-profile.sh.in
|
||||||
../../.version
|
../../.version
|
||||||
../../tests/functional
|
../../tests/functional
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue