Skip to content

Commit

Permalink
Add GNU/Hurd kernel results
Browse files Browse the repository at this point in the history
uname -s does return gnu there.

Resolves: #13740
Signed-off-by: Samuel Thibault <[email protected]>
  • Loading branch information
sthibaul authored and jpakkane committed Oct 20, 2024
1 parent 5e920e3 commit 165c622
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/markdown/Reference-tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions mesonbuild/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
1 change: 1 addition & 0 deletions mesonbuild/scripts/env2mfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions unittests/internaltests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 165c622

Please sign in to comment.