[Git][NTPsec/ntpsec][master] Enable debugging symbols by default, with an option to disable them.

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Sat Apr 1 05:27:44 UTC 2023



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
20a2eaf6 by James Browning at 2023-04-01T05:27:40+00:00
Enable debugging symbols by default, with an option to disable them.

- - - - -


9 changed files:

- .gitlab-ci.yml
- INSTALL.adoc
- NEWS.adoc
- packaging/SUSE/ntpsec.spec
- tests/option-tester.sh
- tests/python2-tester.sh
- tests/python3-tester.sh
- wafhelpers/options.py
- wscript


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -425,11 +425,11 @@ feature-debug:
   script:
     - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
 
-feature-debug-gdb:
+feature-disable-debug-gdb:
   <<: *job_definition
   image: $CI_REGISTRY/ntpsec/ntpsec/alpine
   script:
-    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-gdb build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-debug-gdb build
 
 feature-debug-timing:
   <<: *job_definition


=====================================
INSTALL.adoc
=====================================
@@ -262,8 +262,8 @@ device symlinks for the refclocks.
 
 == Developer options ==
 
---enable-debug-gdb::
-     Enable GDB debugging symbols.
+--disable-debug-gdb::
+     Disable GDB debugging symbols.
 
 == Operation Controls ==
 


=====================================
NEWS.adoc
=====================================
@@ -12,6 +12,8 @@ on user-visible changes.
 
 ## Repository Head
 
+* Enable debug symbols by default, with only an option to disable.
+
 * Add support for ecdhcurves list.
 
 * Fix build on platforms where `-fstack-protector` relies on libssp, like musl.


=====================================
packaging/SUSE/ntpsec.spec
=====================================
@@ -108,7 +108,6 @@ export CCFLAGS="%{optflags}"
     --pythonarchdir=%{python_sitearch} \
     --pythondir=%{python_sitearch} \
     --enable-seccomp \
-    --enable-debug-gdb \
     --enable-early-droproot \
     --enable-leap-smear \
     --enable-mssntp \


=====================================
tests/option-tester.sh
=====================================
@@ -88,13 +88,13 @@ doit ()
 }
 
 # no --disable-manpage on default and all
-doit default ""
-doit minimal "--disable-droproot --disable-mdns-registration --disable-doc --disable-manpage"
+doit default "--disable-debug-gdb"
+doit minimal "--disable-droproot --disable-mdns-registration --disable-doc --disable-manpage --disable-debug-gdb"
 
 # This also tests refclocks without DEBUG
-doit classic "--enable-classic-mode --refclock=all --disable-doc --disable-manpage --enable-pylib=ffi"
+doit classic "--enable-classic-mode --refclock=all --disable-doc --disable-manpage --enable-pylib=ffi --disable-debug-gdb"
 
-doit all     "--enable-warnings --enable-attic --enable-debug --enable-debug-gdb --enable-debug-timing --refclock=all --enable-leap-smear --enable-mssntp --enable-early-droproot --disable-fuzz $LINUX --disable-doc --disable-manpage --enable-pylib=ext"
+doit all     "--enable-warnings --enable-attic --enable-debug --enable-debug-timing --refclock=all --enable-leap-smear --enable-mssntp --enable-early-droproot --disable-fuzz $LINUX --disable-doc --disable-manpage --enable-pylib=ext"
 
 if [ "`which asciidoc 2>/dev/null`" != "" -a \
      "`which xsltproc 2>/dev/null`" != "" ]


=====================================
tests/python2-tester.sh
=====================================
@@ -51,7 +51,7 @@ doit ()
 # Build with only one set of options.  The options don't change
 # the Python side of things.
 
-doit python2 "--disable-droproot --disable-mdns-registration --disable-manpage"
+doit python2 "--disable-droproot --disable-mdns-registration --disable-manpage --disable-debug-gdb"
 
 
 grep warning:                    test*/test.log


=====================================
tests/python3-tester.sh
=====================================
@@ -51,7 +51,7 @@ doit ()
 # Build with only one set of options.  The options don't change
 # the Python side of things.
 
-doit python3 "--disable-droproot --disable-mdns-registration --disable-manpage"
+doit python3 "--disable-droproot --disable-mdns-registration --disable-manpage --disable-debug-gdb"
 
 
 grep warning:                    test*/test.log


=====================================
wafhelpers/options.py
=====================================
@@ -10,8 +10,8 @@ def options_cmd(ctx, config):
     grp = ctx.add_option_group("NTP configure options")
     grp.add_option('--enable-debug', action='store_true',
                    default=False, help="Enable debugging code")
-    grp.add_option('--enable-debug-gdb', action='store_true',
-                   default=False, help="Enable GDB debugging symbols")
+    grp.add_option('--disable-debug-gdb', action='store_true',
+                   default=True, help="Disable GDB debugging symbols")
     grp.add_option('--enable-attic', action='store_true',
                    default=False, help="Enable building attic/*.")
     grp.add_option('--disable-nts', action='store_true',


=====================================
wscript
=====================================
@@ -337,7 +337,7 @@ def configure(ctx):
 
     # we prepend our options to CFLAGS, this allows user provided
     # CFLAGS to override our computed CFLAGS
-    if ctx.options.enable_debug_gdb:
+    if not ctx.options.disable_debug_gdb:
         ctx.env.CFLAGS = ["-g"] + ctx.env.CFLAGS
         ctx.define("USEBACKTRACE", "1", quote=False)
     else:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/20a2eaf63d6bd6738f32f8e841e8e1aa181b5cea

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/20a2eaf63d6bd6738f32f8e841e8e1aa181b5cea
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20230401/5ea94b73/attachment-0001.htm>


More information about the vc mailing list