Add GNU/Hurd kernel results

uname -s does return gnu there.

Resolves: https://github.com/mesonbuild/meson/issues/13740
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
pull/13808/head
Samuel Thibault 1 month ago committed by Jussi Pakkanen
parent 5e920e3907
commit 165c622084
  1. 1
      docs/markdown/Reference-tables.md
  2. 1
      mesonbuild/environment.py
  3. 1
      mesonbuild/scripts/env2mfile.py
  4. 6
      unittests/internaltests.py

@ -182,6 +182,7 @@ Native names as returned by the `.kernel()` method.
| freebsd | | | freebsd | |
| openbsd | | | openbsd | |
| netbsd | | | netbsd | |
| gnu | GNU Hurd |
| nt | | | nt | |
| xnu | Kernel of various Apple OSes | | xnu | Kernel of various Apple OSes |
| illumos | Kernel derived from OpenSolaris by community efforts | | illumos | Kernel derived from OpenSolaris by community efforts |

@ -476,6 +476,7 @@ KERNEL_MAPPINGS: T.Mapping[str, str] = {'freebsd': 'freebsd',
'darwin': 'xnu', 'darwin': 'xnu',
'dragonfly': 'dragonfly', 'dragonfly': 'dragonfly',
'haiku': 'haiku', 'haiku': 'haiku',
'gnu': 'gnu',
} }
def detect_kernel(system: str) -> T.Optional[str]: def detect_kernel(system: str) -> T.Optional[str]:

@ -156,6 +156,7 @@ deb_os_map = {
# map from DEB_HOST_ARCH_OS to Meson machine.kernel() # map from DEB_HOST_ARCH_OS to Meson machine.kernel()
deb_kernel_map = { deb_kernel_map = {
'kfreebsd': 'freebsd', 'kfreebsd': 'freebsd',
'hurd': 'gnu',
} }
def replace_special_cases(special_cases: T.Mapping[str, str], name: str) -> str: def replace_special_cases(special_cases: T.Mapping[str, str], name: str) -> str:

@ -1933,11 +1933,7 @@ class InternalTests(unittest.TestCase):
}, },
system='gnu', system='gnu',
subsystem='gnu', subsystem='gnu',
# TODO: Currently hurd; should match whatever happens kernel='gnu',
# during native builds, but at the moment native builds
# fail when kernel() is called.
# https://github.com/mesonbuild/meson/issues/13740
kernel='TODO',
cpu='i686', cpu='i686',
cpu_family='x86', cpu_family='x86',
endian='little', endian='little',

Loading…
Cancel
Save