commit: dced823547db9fe20b872e1fd1ba65038d595226
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 16 16:09:08 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 16 16:10:32 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dced8235
sys-libs/glibc: avoid -g3 on Hurd
It breaks MIG:
```
make[2]: Leaving directory 'cross-i686-gnu/glibc-2.43/work/glibc-2.43/mach'
make[2]: *** No rule to make target
'cross-i686-gnu/glibc-2.43/work/build-default-i686-gnu-nptl/mach/mach/gnumach.uh',
needed by
'cross-i686-gnu/glibc-2.43/work/build-default-i686-gnu-nptl/mach/mach/gnumach.h'.
Stop.
make[2]: *** Waiting for unfinished jobs...
```
We should try replace this in sys-kernel/gnumach as well with some Makefile
modification as it's a pain to do this all over the place.
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, 20 insertions(+)
diff --git a/sys-libs/glibc/glibc-2.43.ebuild b/sys-libs/glibc/glibc-2.43.ebuild
index 30c75b274204..927bfbdffc9d 100644
--- a/sys-libs/glibc/glibc-2.43.ebuild
+++ b/sys-libs/glibc/glibc-2.43.ebuild
@@ -507,6 +507,16 @@ setup_flags() {
# #829583
filter-lfs-flags
+ case ${CTARGET} in
+ *-linux*)
+ ;;
+ *-gnu)
+ # -g3 confuses MIG which relies on preprocessed input
+ replace-flags -ggdb[3-9] -ggdb2
+ replace-flags -g3 -g
+ ;;
+ esac
+
unset CBUILD_OPT CTARGET_OPT
if use multilib ; then
CTARGET_OPT=$(get_abi_CTARGET)
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index d4df209dbfbb..47a65c1d75c1 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -507,6 +507,16 @@ setup_flags() {
# #829583
filter-lfs-flags
+ case ${CTARGET} in
+ *-linux*)
+ ;;
+ *-gnu)
+ # -g3 confuses MIG which relies on preprocessed input
+ replace-flags -ggdb[3-9] -ggdb2
+ replace-flags -g3 -g
+ ;;
+ esac
+
unset CBUILD_OPT CTARGET_OPT
if use multilib ; then
CTARGET_OPT=$(get_abi_CTARGET)