https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87076

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
On x86_64 the actual -march switch isn't serialized but it is decomposed into
individual -mFEATURE switches by the driver which are serialized.

That is, if you make sure that

int __attribute__((target("arch=armv7-r"))) foo () {}

works then the way LTO operates should work as well (it moves command-line
flags to individual per-function attributes).

The -march switch also appears in the lto_opts LTO section and should be
handed off to the linker by lto-wrapper as well.

You can check that by looking at -v output of the link command and/or
looking at the lto_opts section in the object files.

Reply via email to