configure: Fix debug symbols for installed binaries on macOS
What changed, and why it matters
This commit fixes a macOS build/install issue where debug symbol files (.dSYM bundles) were left behind in the build directory instead of being copied during installation. It adds a compiler flag to make debug info less dependent on absolute source paths and updates the install step to copy the .dSYM bundles next to the installed binaries and plugins. There is no security vulnerability here; it is a developer-experience/operability fix for debugging stack traces on macOS.
No security action required. Treat as a normal build-system fix. If reviewing, verify that the .dSYM copy logic does not accidentally overwrite or expose unintended files, which it does not appear to do.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change modifies configure and Makefile so that on Darwin/macOS: (1) CDEBUGFLAGS gains -fno-standalone-debug to reduce reliance on absolute source paths in DWARF; (2) the install-program target copies any existing .dSYM debug-symbol bundles alongside BIN_PROGRAMS, PKGLIBEXEC_PROGRAMS, and PLUGINS into their respective install destinations. This ensures debuggers and libbacktrace can locate debug info after the build tree is cleaned. No runtime behavior, cryptographic logic, network handling, or privilege boundary is changed.
Changed components
configure scriptMakefile install-program targetmacOS build/install pipelineInspect captured patch +7 / −1
diff --git a/Makefile b/Makefile
index 09a60e3c..ab36d7b6 100644
--- a/Makefile
+++ b/Makefile
@@ -825,6 +825,12 @@ install-program: installdirs $(BIN_PROGRAMS) $(PKGLIBEXEC_PROGRAMS) $(PLUGINS) $
@if [ -d "$(DESTDIR)$(plugindir)/wss-proxy" ]; then rm -rf $(DESTDIR)$(plugindir)/wss-proxy; fi
[ -z "$(PLUGINS)" ] || $(INSTALL_PROGRAM) $(PLUGINS) $(DESTDIR)$(plugindir)
for PY in $(PY_PLUGINS); do DIR=`dirname $$PY`; DST=$(DESTDIR)$(plugindir)/`basename $$DIR`; if [ -d $$DST ]; then rm -rf $$DST; fi; $(INSTALL_PROGRAM) -d $$DIR; cp -a $$DIR $$DST ; done
+ifeq ($(OS),Darwin)
+ # Install dSYM bundles alongside binaries on macOS
+ for BIN in $(BIN_PROGRAMS); do if [ -d $$BIN.dSYM ]; then cp -a $$BIN.dSYM $(DESTDIR)$(bindir)/; fi; done
+ for BIN in $(PKGLIBEXEC_PROGRAMS); do if [ -d $$BIN.dSYM ]; then cp -a $$BIN.dSYM $(DESTDIR)$(pkglibexecdir)/; fi; done
+ for PLUGIN in $(PLUGINS); do if [ -d $$PLUGIN.dSYM ]; then cp -a $$PLUGIN.dSYM $(DESTDIR)$(plugindir)/; fi; done
+endif
MAN1PAGES = $(filter %.1,$(MANPAGES))
MAN5PAGES = $(filter %.5,$(MANPAGES))
diff --git a/configure b/configure
index bdb803be..015af842 100755
--- a/configure
+++ b/configure
@@ -151,7 +151,7 @@ set_defaults()
# Detect macOS and use appropriate debug flags for libbacktrace compatibility
if [ "$(uname -s)" = "Darwin" ]; then
# Always override to avoid DWARF 5
- CDEBUGFLAGS="-std=gnu11 -g -gdwarf-4 -fstack-protector-strong"
+ CDEBUGFLAGS="-std=gnu11 -g -gdwarf-4 -fno-standalone-debug -fstack-protector-strong"
# Optional: confirm dsymutil is available
if ! command -v dsymutil >/dev/null 2>&1; then
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.