configure: drop duplicate AC_ARG_ENABLE([debug]) - #4765
Open
ThalesBarretto wants to merge 1 commit into
Open
Conversation
--enable-debug is declared twice. The first declaration carries the actual logic (sets BUILD_DEBUG and the debug -g -O0 -DDEBUG CFLAGS, consulted by the LTO gate); the second, under a "# enable debug section" banner, has no body and only re-registers the option. Autoconf deduplicates the identical help string, so the second declaration adds no --enable-debug line to `configure --help`. Its only footprint is a dead "enableval=$enable_debug" stanza in the generated configure (never read), plus the misleading banner: the block it opens configures readline, bash-completion, libaio, io_uring, gnfs, urcu and cmocka, not the debug option. Remove the redundant declaration and its two stale banner comments. The real --enable-debug handling is untouched; the generated build system (config.h and every Makefile) is unchanged. Fixes: gluster#4764 Signed-off-by: Thales Antunes de Oliveira Barretto <thales.barretto.git@gmail.com>
ThalesBarretto
marked this pull request as ready for review
September 11, 2026 01:54
amarts
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #4764
What
--enable-debugis declared twice. The first declaration carries thelogic (sets
BUILD_DEBUGand the debug-g -O0 -DDEBUGCFLAGS, consultedby the LTO gate); the second is bodyless and only re-registers the option.
Autoconf deduplicates the identical help string, so the second declaration
adds no
--enable-debugline to./configure --help. Its only footprintis a dead
enableval=$enable_debugstanza in the generatedconfigure(never read) and a misleading
# enable debug section/# end enable debug sectionbanner — that block actually configuresreadline, bash-completion, libaio, io_uring, gnfs, urcu and cmocka.
Change
Remove the redundant declaration and its two stale banner comments. The
real
--enable-debughandling is untouched.Verification
Regenerated
configurebefore/after and diffed: the only change is theremoval of the dead
enableval=$enable_debugstanza and the two comments../configure --helpis byte-identical and still lists--enable-debug.Verified with a real
./configure --enable-debugand fullmakeon sixdistributions (Debian 13, Ubuntu 24.04, CentOS Stream 9, Fedora 42,
openSUSE Leap 15.6, openSUSE Tumbleweed — autoconf 2.69 through 2.73),
each built twice (with and without this patch): the generated build system
(
config.h+ everyMakefile) is byte-identical,--enable-debugsetsBUILD_DEBUG=yesand the-g -O0 -DDEBUGflags on both arms, and bothbuilds succeed with identical per-TU compile flags and an identical set of
shared objects. No build-behaviour change.