On Tue, May 5, 2020 at 10:36 AM Eric Botcazou <botca...@adacore.com> wrote:
>
> Hi,
>
> the link phase is always partial (-r) for VxWorks in kernel mode, which means
> that it uses incremental LTO linking by default (-flinker-output=rel).  But in
> this mode the LTO plugin outputs a warning if one of the object files involved
> in the link does not contain LTO bytecode, before switching to nolto-rel mode.
> We do not do repeated incremental linking for VxWorks so silence the warning.
>
> Tested on PowerPC/VxWorks 7.2, OK for the mainline?

I know it's hidden but can we make the plugin option more specific,
like -linker-output-auto-notlo-rel?  There's also no documentation for
the lto-plugin switches, I think a good place is a comment before

+  else if (strcmp (option, "-linker-output-no-warning") == 0)
+    linker_output_no_warning = true;

explaining the rationale/use-case.

Otherwise looks OK to me.

Richard.

>
> 2020-05-05  Eric Botcazou  <ebotca...@adacore.com>
>
>         * lto-plugin.c (linker_output_set): Change type to bool.
>         (linker_output_known): Likewise.
>         (linker_output_no_warning): New variable.
>         (all_symbols_read_handler): Take it into account.
>         <LDPO_REL>: Do not issue the warning if it is set.
>         (process_option): Process it.
>         (cleanup_handler): Remove unused variable.
>         (onload) <LDPT_LINKER_OUTPUT>: Adjust to above type change.
>
>
> 2020-05-05  Eric Botcazou  <ebotca...@adacore.com>
>
>         * gcc.c (LTO_PLUGIN_SPEC): Define if not already.
>         (LINK_PLUGIN_SPEC): Execute LTO_PLUGIN_SPEC.
>         * config/vxworks.h (LTO_PLUGIN_SPEC): Define.
>
> --
> Eric Botcazou

Reply via email to