From 901eaa1d67cd9399ba396b527c0518ecc9e1e8a5 Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Wed, 12 Aug 2026 01:07:40 -0400 Subject: [PATCH] configure: fix have_function_sections test Since we're linking a standalone program, we have to define main(). Changelog-None --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 761974ad5d7984c942f9001894f795aefeed94ff..f295258b7880a8023e0a307786a9f9cdb922e0e5 100755 --- a/configure +++ b/configure @@ -227,7 +227,7 @@ have_function_sections() TMPCFILE=$CONFIG_VAR_FILE.$$.c TMPOBJFILE=$CONFIG_VAR_FILE.$$.o - echo "int foo(void); int foo(void) { return 0; }" > $TMPCFILE + echo "int main(void); int main(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 $TMPCFILE -o $TMPOBJFILE }