configure: remove `-c` to link test for macOS
What changed, and why it matters
This is a one-line build configuration fix for macOS. The script that checks whether the compiler supports a certain optimization flag was mistakenly passing a 'compile-only' flag during a link test. On macOS, this caused the test to behave incorrectly. The change removes that flag so the test properly attempts to link. There is no runtime security issue here.
No security action required. Treat as a normal build-system fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The configure script’s have_function_sections() probe was invoking the compiler with ‘-c’ (compile only, no link) while also passing ‘-Wl,–gc-sections’ (a linker option). On macOS, this combination can cause the probe to misreport whether -ffunction-sections/–gc-sections works. The patch removes ‘-c’ so the probe actually links. This is a build-system correctness fix with no direct security relevance.
Changed components
configure scriptbuild system detection of -ffunction-sections/--gc-sectionsInspect captured patch +1 / −1
diff --git a/configure b/configure
index bead274a..0cd88749 100755
--- a/configure
+++ b/configure
@@ -225,7 +225,7 @@ have_function_sections()
echo "int foo(void); int foo(void) { return 0; }" > $TMPCFILE
# We *want* this to fail if we get a warning, hence use -Werror.
- $1 $2 -Werror -ffunction-sections -Wl,--gc-sections -c $TMPCFILE -o $TMPOBJFILE
+ $1 $2 -Werror -ffunction-sections -Wl,--gc-sections $TMPCFILE -o $TMPOBJFILE
}
usage()
Why this scored 15/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.