diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index e4e964c2d3d7..a5d0d5cdcc18 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -182,6 +182,7 @@ Native names as returned by the `.kernel()` method. | freebsd | | | openbsd | | | netbsd | | +| gnu | GNU Hurd | | nt | | | xnu | Kernel of various Apple OSes | | illumos | Kernel derived from OpenSolaris by community efforts | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 71a2f3afcb6a..2621b9ca2db1 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -476,6 +476,7 @@ def detect_cpu(compilers: CompilersDict) -> str: 'darwin': 'xnu', 'dragonfly': 'dragonfly', 'haiku': 'haiku', + 'gnu': 'gnu', } def detect_kernel(system: str) -> T.Optional[str]: diff --git a/mesonbuild/scripts/env2mfile.py b/mesonbuild/scripts/env2mfile.py index 207d75749c95..b2c9a45b2f80 100755 --- a/mesonbuild/scripts/env2mfile.py +++ b/mesonbuild/scripts/env2mfile.py @@ -156,6 +156,7 @@ def get_args_from_envvars(infos: MachineInfo) -> None: # map from DEB_HOST_ARCH_OS to Meson machine.kernel() deb_kernel_map = { 'kfreebsd': 'freebsd', + 'hurd': 'gnu', } def replace_special_cases(special_cases: T.Mapping[str, str], name: str) -> str: diff --git a/unittests/internaltests.py b/unittests/internaltests.py index 23d08e6e2992..3f50ac6e009b 100644 --- a/unittests/internaltests.py +++ b/unittests/internaltests.py @@ -1933,11 +1933,7 @@ def expected_binaries(gnu_tuple: str) -> T.Dict[str, T.List[str]]: }, system='gnu', subsystem='gnu', - # TODO: Currently hurd; should match whatever happens - # during native builds, but at the moment native builds - # fail when kernel() is called. - # https://github.com/mesonbuild/meson/issues/13740 - kernel='TODO', + kernel='gnu', cpu='i686', cpu_family='x86', endian='little',