https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78353
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by H.J. Lu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:ecdb697389b284a0f3912932e0a440c1071fbadd commit r9-9344-gecdb697389b284a0f3912932e0a440c1071fbadd Author: Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> Date: Mon Feb 24 11:55:45 2020 +0530 PR47785: Add support for handling Xassembler/Wa options with LTO. Skip the test if arm7a is not supported at link time. This is the case if the toolchain targets an M-profile CPU by default and does not have A-profile multilib: the link step fails because it tries to mix M-profile startup files with A-profile testcase. gcc/ 2020-02-24 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> Kugan Vivekandarajah <kugan.vivekanandara...@linaro.org> PR driver/47785 * gcc.c (putenv_COLLECT_AS_OPTIONS): New function. (driver::main): Call putenv_COLLECT_AS_OPTIONS. * opts-common.c (parse_options_from_collect_gcc_options): New function. (prepend_xassembler_to_collect_as_options): Likewise. * opts.h (parse_options_from_collect_gcc_options): Declare prototype. (prepend_xassembler_to_collect_as_options): Likewise. * lto-opts.c (lto_write_options): Stream assembler options in COLLECT_AS_OPTIONS. * lto-wrapper.c (xassembler_options_error): New static variable. (get_options_from_collect_gcc_options): Move parsing options code to parse_options_from_collect_gcc_options and call it. (merge_and_complain): Validate -Xassembler options. (append_compiler_options): Handle OPT_Xassembler. (run_gcc): Append command line -Xassembler options to collect_gcc_options. * doc/invoke.texi: Add documentation about using Xassembler options with LTO. gcc/testsuite/ 2020-02-24 Christophe Lyon <christophe.l...@linaro.org> PR lto/78353 * gcc.target/arm/pr78353-1.c: Add arm_arch_v7a_multilib effective target. * gcc.target/arm/pr78353-2.c: Likewise. 2020-02-24 Prathamesh Kulkarni <prathamesh.kulka...@linaro.org> Kugan Vivekandarajah <kugan.vivekanandara...@linaro.org> * gcc.target/arm/pr78353-1.c: New test. * gcc.target/arm/pr78353-2.c: Likewise. (cherry picked from commit f1a681a174cdfb82e62c246d6f4add9a25fc2e43)