[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |9.4 --- Comment #22 from H.J. Lu --- Fix for GCC 10 and GCC 9.4.
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 --- Comment #21 from Thomas Weißschuh --- The commited fix produces false positives for assembler options that do not influence the compilation output directly. For example "-a=$FILE" to create assembler listings. (Whose target files have to differ between different input files by design.)
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 --- Comment #20 from CVS Commits --- The releases/gcc-9 branch has been updated by H.J. Lu : https://gcc.gnu.org/g:ecdb697389b284a0f3912932e0a440c1071fbadd commit r9-9344-gecdb697389b284a0f3912932e0a440c1071fbadd Author: Prathamesh Kulkarni 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 Kugan Vivekandarajah 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 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 Kugan Vivekandarajah * gcc.target/arm/pr78353-1.c: New test. * gcc.target/arm/pr78353-2.c: Likewise. (cherry picked from commit f1a681a174cdfb82e62c246d6f4add9a25fc2e43)
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 --- Comment #19 from H.J. Lu --- I'd like to backport it to GCC 9.
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 Mark Wielaard changed: What|Removed |Added CC||mark at gcc dot gnu.org --- Comment #18 from Mark Wielaard --- Since this patch has been included in gcc10 (I verified it works now, but fails with gcc9) can this issue be closed? Or does it need backporting to earlier versions?
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 --- Comment #17 from CVS Commits --- The master branch has been updated by Prathamesh Kulkarni : https://gcc.gnu.org/g:f1a681a174cdfb82e62c246d6f4add9a25fc2e43 commit r10-6807-gf1a681a174cdfb82e62c246d6f4add9a25fc2e43 Author: Prathamesh Kulkarni Date: Mon Feb 24 11:55:45 2020 +0530 PR47785: Add support for handling Xassembler/Wa options with LTO. 2020-02-24 Prathamesh Kulkarni Kugan Vivekandarajah 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. testsuite/ * gcc.target/arm/pr78353-1.c: New test. * gcc.target/arm/pr78353-2.c: Likewise.
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 --- Comment #16 from H.J. Lu --- (In reply to H.J. Lu from comment #15) > We need to also handle -Xassembler? Since -Wa, doesn't work with comma in > assembler options, like -mfoo=foo1,foo2, one needs to use > > -Xassembler -mfoo=foo1,foo2 > > to pass -mfoo=foo1,foo2 to assembler. We may also have -Xassembler -mfoo=foo1,foo2 -Wa,-mbar
[Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785 H.J. Lu changed: What|Removed |Added Summary|GCC with -flto does not |GCC with -flto does not |pass -Wa options to the |pass -Wa/-Xassembler |assembler |options to the assembler --- Comment #15 from H.J. Lu --- We need to also handle -Xassembler? Since -Wa, doesn't work with comma in assembler options, like -mfoo=foo1,foo2, one needs to use -Xassembler -mfoo=foo1,foo2 to pass -mfoo=foo1,foo2 to assembler.