Georg-Johann Lay <[email protected]> writes:

> This patch fixes -mno-call-main which did not work with LTO.
>
> Instead of emitting  .global __call_main + __call_main=0  in some
> module, it uses a %{mno-call-main: --defsym __call_main=0} spec.
>
> The problem with the old implementation is that avr_no_call_main_p was
> set by cc1[plus] (in avr_insert_attributes) but used by lto1 (in
> avr_file_end).
> The new approach uses  --defsym __call_main=0  in order to avoid link
> fails due to multiple definitions of __call_main in *.o and lib<mcu>.a.
>
> This is for trunk.  If you agree, I would also packport it.
>

Ok.
Please apply.

Denis

Reply via email to