In the avr backend there is a static variable avr_no_call_main_p that
is set in TARGET_INSERT_ATTRIBUTES and used in TARGET_ASM_FILE_END.

This works as expected in non-LTO compilations, with LTO however,
TARGET_INSERT_ATTRIBUTES runs in cc1[plus] but TARGET_ASM_FILE_END
is run by lto1, hence the variable is not set as expected.

What's the recommended way to handle such a situation?

Thanks,

Johann



Reply via email to