[PATCH 16/94] sys-libs/glibc: avoid -g3 on Hurd

Sam James <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <9deb6ebfa0588f01811a237d0ded8af8a77e6f5f.1774994291.git.sam@gentoo.org>
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 <[email protected]>
---
 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 6d6c1002f249e..bccbda7c68be1 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 8b4b57358721d..874d42c4a43d3 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)
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.