Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-10]: src/share/mk Pull up following revision(s) (requested by mrg...



details:   https://anonhg.NetBSD.org/src/rev/49edba0ca511
branches:  netbsd-10
changeset: 373511:49edba0ca511
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Feb 14 15:47:01 2023 +0000

description:
Pull up following revision(s) (requested by mrg in ticket #81):

        external/gpl3/gdb.old/Makefile.inc: revision 1.12
        share/mk/bsd.lib.mk: revision 1.390
        external/gpl3/gdb/Makefile.inc: revision 1.13
        external/mit/xorg/lib/gallium.old/Makefile: revision 1.5
        external/mit/xorg/lib/gallium/Makefile: revision 1.49

fix code attempting to skip adding "-g" if "-g*" already is used.

in bsd.lib.mk there's a check for "MKDEBUG != no" that will add
-g to CFLAGS (maybe) and to CSHLIBFLAGS (always), given that it
isn't in CFLAGS already.. except the conditional is "||" instead
of "&&" and since the MKDEBUG/NODEBUG checks pass, the CFLAGS
check isn't even performed.

additionally, check CXXFLAGS as well as CFLAGS.

this fixes the attempt to use "-g1" in the llvmrt build, which
fails because the compile lines end up being "... -g1 .. -g ..",
(the "-g" comes from the CSHLIBFLAGS variable in that case.)
this reduces the size of llvm-enabled gallium debug by ~1.5GiB
on amd64.

apply -g1 to the gallium sources as well.  saves another couple of 100MB.

apply -g1 to the gdb build as well.
reduces the size of gdb.debug and gdbtui.debug by 100MB each on amd64,
and about 70MB total in the debug set.  (across all builds, this may
be in the order of 3-4GB in releasedir output.)

diffstat:

 external/gpl3/gdb.old/Makefile.inc         |  7 ++++++-
 external/gpl3/gdb/Makefile.inc             |  7 ++++++-
 external/mit/xorg/lib/gallium.old/Makefile |  8 +++++++-
 external/mit/xorg/lib/gallium/Makefile     |  8 +++++++-
 share/mk/bsd.lib.mk                        |  8 +++++---
 5 files changed, 31 insertions(+), 7 deletions(-)

diffs (102 lines):

diff -r 03a27ec834c0 -r 49edba0ca511 external/gpl3/gdb.old/Makefile.inc
--- a/external/gpl3/gdb.old/Makefile.inc        Sun Feb 12 12:39:37 2023 +0000
+++ b/external/gpl3/gdb.old/Makefile.inc        Tue Feb 14 15:47:01 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2020/09/14 00:39:47 christos Exp $
+# $NetBSD: Makefile.inc,v 1.11.6.1 2023/02/14 15:47:01 martin Exp $
 
 USE_LIBEDIT=no
 USE_TUI=yes
@@ -15,3 +15,8 @@
                        -Wno-string-plus-int
 
 DIST:=         ${.PARSEDIR}/dist
+
+# Reduce debugging for these extremely large objects.
+.if ${MKDEBUG:Uno} != "no"
+CXXFLAGS+=      -g1
+.endif
diff -r 03a27ec834c0 -r 49edba0ca511 external/gpl3/gdb/Makefile.inc
--- a/external/gpl3/gdb/Makefile.inc    Sun Feb 12 12:39:37 2023 +0000
+++ b/external/gpl3/gdb/Makefile.inc    Tue Feb 14 15:47:01 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.12 2021/04/13 01:11:05 mrg Exp $
+# $NetBSD: Makefile.inc,v 1.12.6.1 2023/02/14 15:47:01 martin Exp $
 
 USE_LIBEDIT=no
 USE_TUI=yes
@@ -17,3 +17,8 @@
 COPTS+=                        -fcommon
 
 DIST:=         ${.PARSEDIR}/dist
+
+# Reduce debugging for these extremely large objects.
+.if ${MKDEBUG:Uno} != "no"
+CXXFLAGS+=      -g1
+.endif
diff -r 03a27ec834c0 -r 49edba0ca511 external/mit/xorg/lib/gallium.old/Makefile
--- a/external/mit/xorg/lib/gallium.old/Makefile        Sun Feb 12 12:39:37 2023 +0000
+++ b/external/mit/xorg/lib/gallium.old/Makefile        Tue Feb 14 15:47:01 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2022/09/29 18:58:04 rjs Exp $
+# $NetBSD: Makefile,v 1.4.2.1 2023/02/14 15:47:01 martin Exp $
 
 # Transparent struct/union broken
 NOLINT=yes
@@ -31,6 +31,12 @@
 CFLAGS+=       -pthread
 LDFLAGS+=      -pthread
 
+# Reduce debugging for these extremely large objects.
+.if ${MKDEBUG:Uno} != "no"
+CXXFLAGS+=     -g1
+CFLAGS+=       -g1
+.endif
+
 GALLIUM_SUBDIRS= \
        auxiliary \
        auxiliary/cso_cache \
diff -r 03a27ec834c0 -r 49edba0ca511 external/mit/xorg/lib/gallium/Makefile
--- a/external/mit/xorg/lib/gallium/Makefile    Sun Feb 12 12:39:37 2023 +0000
+++ b/external/mit/xorg/lib/gallium/Makefile    Tue Feb 14 15:47:01 2023 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.48 2021/07/11 20:52:06 mrg Exp $
+# $NetBSD: Makefile,v 1.48.2.1 2023/02/14 15:47:01 martin Exp $
 
 # Link the gallium mega driver.
 
@@ -28,6 +28,12 @@
 CFLAGS+=       -pthread
 LDFLAGS+=      -pthread
 
+# Reduce debugging for these extremely large objects.
+.if ${MKDEBUG:Uno} != "no"
+CXXFLAGS+=     -g1
+CFLAGS+=       -g1
+.endif
+
 GALLIUM_SUBDIRS= \
        auxiliary \
        auxiliary/cso_cache \
diff -r 03a27ec834c0 -r 49edba0ca511 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Sun Feb 12 12:39:37 2023 +0000
+++ b/share/mk/bsd.lib.mk       Tue Feb 14 15:47:01 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.389 2022/03/29 22:48:04 christos Exp $
+#      $NetBSD: bsd.lib.mk,v 1.389.2.1 2023/02/14 15:47:01 martin Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -169,8 +169,10 @@
 MKSHLIBOBJS= no
 .endif
 
-.if (${MKDEBUG:Uno} != "no" && !defined(NODEBUG)) || \
-    (defined(CFLAGS) && !empty(CFLAGS:M*-g*))
+# Avoid adding "-g" if we already have a "-g*" option.
+.if (${MKDEBUG:Uno} != "no" && !defined(NODEBUG)) && \
+    (!defined(CFLAGS) || empty(CFLAGS:M-g*)) && \
+    (!defined(CXXFLAGS) || empty(CXXFLAGS:M-g*))
 # We only add -g to the shared library objects
 # because we don't currently split .a archives.
 CSHLIBFLAGS+=  -g



Home | Main Index | Thread Index | Old Index