Fix optiboot link failure with GCC 15 / newer binutils
Linking failed with "relocation target address is odd" against
exit in call_main.o. GCC 15 added -mno-call-main for exactly this
case: main is placed directly in .init9 (optiboot never returns
from it), so the libc __call_main/exit startup sequence doesn't
apply and isn't safely relocatable here. Reproduced identically on
unmodified upstream optiboot HEAD, so this is a toolchain
incompatibility, not something already fixed upstream.
Detect support via a compile probe rather than grepping
--help=target output, since GCC only lists the -mcall-main
(default) spelling there, not the -mno- form, so a grep-based check
would false-negative even on a GCC that accepts the flag. Falls
back to unmodified behavior on toolchains that reject it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>