From: Olivier Houchard Date: Thu, 15 Oct 2026 15:12:18 +0000 (+0200) Subject: BUILD: sym: Keep a temporary binary without .gnu_debugdata X-Git-Tag: v3.5-dev10~186 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=af3a1fb60f66e6a24ea8a2a79b672a867bd40e6d;p=haproxy.git BUILD: sym: Keep a temporary binary without .gnu_debugdata When we linked the binary, before we attempt to generate its .gnu_debugdata section, copy the binary, as haproxy.noxz, just so that if for any reason, adding the new section fails, we at least still have a working binary. --- diff --git a/Makefile b/Makefile index f575e2a1f..a51a50eba 100644 --- a/Makefile +++ b/Makefile @@ -1107,7 +1107,8 @@ endif # non-empty target # implementations lack the long ones, and undefined symbols are told by their # type in awk instead of --defined-only, which these implementations lack too. define make_minidebug - $(call qinfo, MINIDBG)if ! ( \ + $(call qinfo, MINIDBG)cp -f $@ $@.noxz; \ + if ! ( \ $(NM) -D -P $@ | awk '$$2 != "U" && $$2 != "w" { print $$1 }' | sort > $@.dsyms && \ $(NM) -P $@ | awk '$$2 == "T" || $$2 == "t" { print $$1 }' | sort > $@.fsyms && \ $(NM) -P $@ | awk '$$2 == "T" || $$2 == "t" { print $$1, $$3 }' | sort > $@.symaddrs && \ @@ -1262,6 +1263,7 @@ uninstall: clean: $(Q)rm -f *.[oas] src/*.[oas] haproxy haterm test .build_opts .build_opts.new + $(Q)rm -f haproxy.noxz haterm.noxz haload.noxz $(Q)for p in haproxy haterm haload; do rm -f $$p.dsyms $$p.fsyms $$p.ksyms $$p.dbg $$p.mini $$p.mini.xz; done $(Q)for dir in . src dev/* admin/* addons/* include/* doc; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done $(Q)rm -f haproxy-$(VERSION).tar.gz haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION).tar.gz