From f9973834fa39b0c7babc8ac8e4050e862a4bf2e7 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 29 May 2024 23:18:03 +0200 Subject: [PATCH] Add GNU/Hurd support It uses SysV ABI too. --- src/targets.rs | 7 +++++++ src/triple.rs | 1 + 2 files changed, 8 insertions(+) diff --git a/src/targets.rs b/src/targets.rs index f764b34..749f394 100644 --- a/src/targets.rs +++ b/src/targets.rs @@ -640,6 +640,7 @@ pub enum OperatingSystem { Haiku, Hermit, Horizon, + Hurd, Illumos, Ios, L4re, @@ -684,6 +685,7 @@ impl OperatingSystem { Haiku => Cow::Borrowed("haiku"), Hermit => Cow::Borrowed("hermit"), Horizon => Cow::Borrowed("horizon"), + Hurd => Cow::Borrowed("hurd"), Illumos => Cow::Borrowed("illumos"), Ios => Cow::Borrowed("ios"), L4re => Cow::Borrowed("l4re"), @@ -735,6 +737,7 @@ pub enum Environment { GnuIlp32, GnuLlvm, HermitKernel, + HurdKernel, LinuxKernel, Macabi, Musl, @@ -775,6 +778,7 @@ impl Environment { GnuIlp32 => Cow::Borrowed("gnu_ilp32"), GnuLlvm => Cow::Borrowed("gnullvm"), HermitKernel => Cow::Borrowed("hermitkernel"), + HurdKernel => Cow::Borrowed("hurdkernel"), LinuxKernel => Cow::Borrowed("linuxkernel"), Macabi => Cow::Borrowed("macabi"), Musl => Cow::Borrowed("musl"), @@ -1407,6 +1411,7 @@ impl FromStr for OperatingSystem { "haiku" => Haiku, "hermit" => Hermit, "horizon" => Horizon, + "hurd" => Hurd, "illumos" => Illumos, "ios" => Ios, "l4re" => L4re, @@ -1461,6 +1466,7 @@ impl FromStr for Environment { "gnu_ilp32" => GnuIlp32, "gnullvm" => GnuLlvm, "hermitkernel" => HermitKernel, + "hurdkernel" => HurdKernel, "linuxkernel" => LinuxKernel, "macabi" => Macabi, "musl" => Musl, @@ -1607,6 +1613,7 @@ mod tests { "i686-unknown-dragonfly", "i686-unknown-freebsd", "i686-unknown-haiku", + "i686-unknown-hurd-gnu", "i686-unknown-linux-gnu", "i686-unknown-linux-musl", "i686-unknown-netbsd", diff --git a/src/triple.rs b/src/triple.rs index b492a29..fe7b4d5 100644 --- a/src/triple.rs +++ b/src/triple.rs @@ -137,6 +137,7 @@ impl Triple { | OperatingSystem::Fuchsia | OperatingSystem::Haiku | OperatingSystem::Hermit + | OperatingSystem::Hurd | OperatingSystem::L4re | OperatingSystem::Linux | OperatingSystem::Netbsd