From a629febe31ef0ecf5212327a1df2600cbfac9cb2 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Jan 2026 16:02:40 +0100 Subject: [PATCH 1/3] Fix the OS string encoding for GNU/Hurd Following https://github.com/haskell/cabal/pull/9434/files , and as seen in the various gnu_HOST_OS usages in the ghc source code, it is expected that GNU/Hurd is advertised as "gnu", like the autotools do. --- Cabal/src/Distribution/Simple/PreProcess.hs | 2 +- changelog.d/pr-11401 | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 changelog.d/pr-11401 diff --git a/Cabal/src/Distribution/Simple/PreProcess.hs b/Cabal/src/Distribution/Simple/PreProcess.hs index 4db235065c7..984ba553379 100644 --- a/Cabal/src/Distribution/Simple/PreProcess.hs +++ b/Cabal/src/Distribution/Simple/PreProcess.hs @@ -797,7 +797,7 @@ platformDefines lbi = Android -> ["android"] Ghcjs -> ["ghcjs"] Wasi -> ["wasi"] - Hurd -> ["hurd"] + Hurd -> ["gnu"] Haiku -> ["haiku"] OtherOS _ -> [] archStr = case hostArch of diff --git a/changelog.d/pr-11401 b/changelog.d/pr-11401 new file mode 100644 index 00000000000..4093ffe0ee4 --- /dev/null +++ b/changelog.d/pr-11401 @@ -0,0 +1,12 @@ +synopsis: Fix the OS string encoding for GNU/Hurd +packages: Cabal +prs: #11401 + +description: { + +Following https://github.com/haskell/cabal/pull/9434/files , and as seen +in the various gnu_HOST_OS usages in the ghc source code, it is expected that +GNU/Hurd is advertised as "gnu", so the OS String encoding for OSHurd was +updated into "gnu". + +} From 044b928b52481c87e7bb61e5953c6e2b9e0e6489 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Jan 2026 21:32:36 +0100 Subject: [PATCH 2/3] Update changelog.d/pr-11401 Co-authored-by: ffaf1 --- changelog.d/pr-11401 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.d/pr-11401 b/changelog.d/pr-11401 index 4093ffe0ee4..b12c5dbaa70 100644 --- a/changelog.d/pr-11401 +++ b/changelog.d/pr-11401 @@ -4,8 +4,8 @@ prs: #11401 description: { -Following https://github.com/haskell/cabal/pull/9434/files , and as seen -in the various gnu_HOST_OS usages in the ghc source code, it is expected that +Following [#9434](https://github.com/haskell/cabal/pull/9434/), and as seen +in the various `gnu_HOST_OS` usages in the GHC source code, it is expected that GNU/Hurd is advertised as "gnu", so the OS String encoding for OSHurd was updated into "gnu". From 0a64552dbe8896e9780c972ede288551e5cb0b40 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 10 Jan 2026 21:35:29 +0100 Subject: [PATCH 3/3] Fixups --- changelog.d/pr-11401 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.d/pr-11401 b/changelog.d/pr-11401 index b12c5dbaa70..37573b337bc 100644 --- a/changelog.d/pr-11401 +++ b/changelog.d/pr-11401 @@ -5,8 +5,8 @@ prs: #11401 description: { Following [#9434](https://github.com/haskell/cabal/pull/9434/), and as seen -in the various `gnu_HOST_OS` usages in the GHC source code, it is expected that +in the various `gnu_HOST_OS` uses in the GHC source code, it is expected that GNU/Hurd is advertised as "gnu", so the OS String encoding for OSHurd was -updated into "gnu". +corrected to "gnu". }