commit:     063f9627aedf6748f5a54e91db81288066267cc4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  7 05:56:36 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar 15 22:29:47 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=063f9627

sys-libs/glibc: prepare for GNU Hurd

We need to DEPEND on sys-kernel/gnumach for GNU Hurd (*-gnu, but not
*-linux-gnu) but with a slight snag in that we need -headers-only, as
gnumach[headers-only] is the very initial build we do w/o GNU MIG.

We may wish to pull in some Debian-local [0] patches to workaround issues
with CPython but not tried that yet. Hurd support is in upstream glibc but
Debian has some patches to stub interfaces or add hacks to make packages
work which aren't suitable for upstream. But a surprising amount works without
those.

[0] 
https://salsa.debian.org/glibc-team/glibc/-/tree/79c4c17e7279b51e0ecd0368076ee8fcd8fb4f2f/debian/patches/hurd-i386

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/glibc/glibc-2.43.ebuild | 10 +++++++++-
 sys-libs/glibc/glibc-9999.ebuild | 10 +++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/sys-libs/glibc/glibc-2.43.ebuild b/sys-libs/glibc/glibc-2.43.ebuild
index 5779dfe29eb7..6d6c1002f249 100644
--- a/sys-libs/glibc/glibc-2.43.ebuild
+++ b/sys-libs/glibc/glibc-2.43.ebuild
@@ -151,7 +151,15 @@ if [[ ${CATEGORY} == cross-* ]] ; then
                >=${CATEGORY}/binutils-2.27
                >=${CATEGORY}/gcc-6.2
        )"
-       [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
+
+       case ${CATEGORY} in
+               *-linux*)
+                       DEPEND+=" ${CATEGORY}/linux-headers"
+                       ;;
+               *-gnu)
+                       DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
+                       ;;
+       esac
 else
        BDEPEND+="
                >=sys-devel/binutils-2.27

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 8e93624a19f1..8b4b57358721 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -151,7 +151,15 @@ if [[ ${CATEGORY} == cross-* ]] ; then
                >=${CATEGORY}/binutils-2.27
                >=${CATEGORY}/gcc-6.2
        )"
-       [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
+
+       case ${CATEGORY} in
+               *-linux*)
+                       DEPEND+=" ${CATEGORY}/linux-headers"
+                       ;;
+               *-gnu)
+                       DEPEND+=" ${CATEGORY}/gnumach[-headers-only]"
+                       ;;
+       esac
 else
        BDEPEND+="
                >=sys-devel/binutils-2.27

Reply via email to