public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/47785] New: GCC with -flto does not pass options to the assembler
@ 2011-02-17 16:56 d.g.gorbachev at gmail dot com
  2011-02-18 12:27 ` [Bug driver/47785] " rguenth at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-02-17 16:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785

           Summary: GCC with -flto does not pass options to the assembler
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com


Created attachment 23384
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23384
Testcase


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
@ 2011-02-18 12:27 ` rguenth at gcc dot gnu.org
  2011-11-02 15:01 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-18 12:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.02.18 12:00:41
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-18 12:00:41 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
  2011-02-18 12:27 ` [Bug driver/47785] " rguenth at gcc dot gnu.org
@ 2011-11-02 15:01 ` rguenth at gcc dot gnu.org
  2014-06-12 18:01 ` m8r-540gv7 at mailinator dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-11-02 15:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47785

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 15:01:09 UTC ---
For this to be fixed we'd need something similar to COLLECT_GCC_OPTIONS,
COLLECT_AS_OPTIONS for example, and lto-wrapper passing those on via
-Wa to the link-time driver.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
  2011-02-18 12:27 ` [Bug driver/47785] " rguenth at gcc dot gnu.org
  2011-11-02 15:01 ` rguenth at gcc dot gnu.org
@ 2014-06-12 18:01 ` m8r-540gv7 at mailinator dot com
  2014-06-12 18:18 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: m8r-540gv7 at mailinator dot com @ 2014-06-12 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

m8r-540gv7 at mailinator dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m8r-540gv7 at mailinator dot com

--- Comment #3 from m8r-540gv7 at mailinator dot com ---
This causes compilation of AVX code using GCC 4.9 to fail on OS X Mavericks;
any plans to fix?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (2 preceding siblings ...)
  2014-06-12 18:01 ` m8r-540gv7 at mailinator dot com
@ 2014-06-12 18:18 ` dominiq at lps dot ens.fr
  2014-06-12 18:20 ` dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-06-12 18:18 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dominiq at lps dot ens.fr

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 61168 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (3 preceding siblings ...)
  2014-06-12 18:18 ` dominiq at lps dot ens.fr
@ 2014-06-12 18:20 ` dominiq at lps dot ens.fr
  2015-07-17 14:01 ` ray.kinsella at intel dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-06-12 18:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> This causes compilation of AVX code using GCC 4.9 to fail on OS X Mavericks; ...

Exactly why I have opened pr61168!-(still not fixed).


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (4 preceding siblings ...)
  2014-06-12 18:20 ` dominiq at lps dot ens.fr
@ 2015-07-17 14:01 ` ray.kinsella at intel dot com
  2015-09-23 12:11 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ray.kinsella at intel dot com @ 2015-07-17 14:01 UTC (permalink / raw)
  To: gcc-bugs

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

Ray Kinsella <ray.kinsella at intel dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ray.kinsella at intel dot com

--- Comment #6 from Ray Kinsella <ray.kinsella at intel dot com> ---
Confirmed as still not fixed in 4.9.1 (with Yocto 1.8)


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (5 preceding siblings ...)
  2015-07-17 14:01 ` ray.kinsella at intel dot com
@ 2015-09-23 12:11 ` dominiq at lps dot ens.fr
  2020-07-16 22:19 ` [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler " mark at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-09-23 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Another instance on x86_64-apple-darwin14 with Xcode 7

[Book15] f90/bug% gcc6 /opt/gcc/_clean/gcc/testsuite/gcc.dg/debug/pr41893-1.c
-gstabs1 -Wa,-Q -flto -fwhole-program -O
/opt/gcc/_clean/gcc/testsuite/gcc.dg/debug/pr41893-2.c
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:1:9: error:
unsupported directive '.stabs'
        .stabs 
"/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccnRWDSD.ltrans0.o",100,0,0,Ltext0
                ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:4:9: error:
unsupported directive '.stabs'
        .stabs  "gcc2_compiled.",60,0,0,0
                ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:8:9: error:
unsupported directive '.stabs'
        .stabs 
"/opt/gcc/_clean/gcc/testsuite/gcc.dg/debug/pr41893-1.c",132,0,0,Ltext1
                ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:10:2: error:
unknown directive
        .stabd  68,0,16
        ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:13:2: error:
unknown directive
        .stabd  68,0,16
        ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:17:9: error:
unsupported directive '.stabs'
        .stabs  "main:F(0,1)=r(0,1);-2147483648;2147483647;",36,0,0,_main
                ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:22:2: error:
unknown directive
        .stabd  68,0,12
        ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:27:9: error:
unsupported directive '.stabs'
        .stabs  "func1:F(0,2)=(0,2)",36,0,0,_func1
                ^
/var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccJ7keUF.s:72:9: error:
unsupported directive '.stabs'
        .stabs  "",100,0,0,Letext0
                ^
lto-wrapper: fatal error: gcc6 returned 1 exit status
compilation terminated.
collect2: fatal error: lto-wrapper returned 1 exit status
compilation terminated.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (6 preceding siblings ...)
  2015-09-23 12:11 ` dominiq at lps dot ens.fr
@ 2020-07-16 22:19 ` mark at gcc dot gnu.org
  2021-04-09 16:56 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mark at gcc dot gnu.org @ 2020-07-16 22:19 UTC (permalink / raw)
  To: gcc-bugs

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

Mark Wielaard <mark at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at gcc dot gnu.org

--- Comment #18 from Mark Wielaard <mark at gcc dot gnu.org> ---
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?

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (7 preceding siblings ...)
  2020-07-16 22:19 ` [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler " mark at gcc dot gnu.org
@ 2021-04-09 16:56 ` hjl.tools at gmail dot com
  2021-04-12 12:29 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2021-04-09 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> ---
I'd like to backport it to GCC 9.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (8 preceding siblings ...)
  2021-04-09 16:56 ` hjl.tools at gmail dot com
@ 2021-04-12 12:29 ` cvs-commit at gcc dot gnu.org
  2021-06-19  7:46 ` gcc@t-8ch.de
  2021-07-15 17:48 ` hjl.tools at gmail dot com
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-12 12:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:ecdb697389b284a0f3912932e0a440c1071fbadd

commit r9-9344-gecdb697389b284a0f3912932e0a440c1071fbadd
Author: Prathamesh Kulkarni <prathamesh.kulkarni@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.kulkarni@linaro.org>
                Kugan Vivekandarajah  <kugan.vivekanandarajah@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.lyon@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.kulkarni@linaro.org>
                Kugan Vivekandarajah  <kugan.vivekanandarajah@linaro.org>

            * gcc.target/arm/pr78353-1.c: New test.
            * gcc.target/arm/pr78353-2.c: Likewise.

    (cherry picked from commit f1a681a174cdfb82e62c246d6f4add9a25fc2e43)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (9 preceding siblings ...)
  2021-04-12 12:29 ` cvs-commit at gcc dot gnu.org
@ 2021-06-19  7:46 ` gcc@t-8ch.de
  2021-07-15 17:48 ` hjl.tools at gmail dot com
  11 siblings, 0 replies; 13+ messages in thread
From: gcc@t-8ch.de @ 2021-06-19  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Thomas Weißschuh <gcc@t-8ch.de> ---
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.)

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler options to the assembler
  2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
                   ` (10 preceding siblings ...)
  2021-06-19  7:46 ` gcc@t-8ch.de
@ 2021-07-15 17:48 ` hjl.tools at gmail dot com
  11 siblings, 0 replies; 13+ messages in thread
From: hjl.tools at gmail dot com @ 2021-07-15 17:48 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |9.4

--- Comment #22 from H.J. Lu <hjl.tools at gmail dot com> ---
Fix for GCC 10 and GCC 9.4.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-07-15 17:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 16:56 [Bug driver/47785] New: GCC with -flto does not pass options to the assembler d.g.gorbachev at gmail dot com
2011-02-18 12:27 ` [Bug driver/47785] " rguenth at gcc dot gnu.org
2011-11-02 15:01 ` rguenth at gcc dot gnu.org
2014-06-12 18:01 ` m8r-540gv7 at mailinator dot com
2014-06-12 18:18 ` dominiq at lps dot ens.fr
2014-06-12 18:20 ` dominiq at lps dot ens.fr
2015-07-17 14:01 ` ray.kinsella at intel dot com
2015-09-23 12:11 ` dominiq at lps dot ens.fr
2020-07-16 22:19 ` [Bug driver/47785] GCC with -flto does not pass -Wa/-Xassembler " mark at gcc dot gnu.org
2021-04-09 16:56 ` hjl.tools at gmail dot com
2021-04-12 12:29 ` cvs-commit at gcc dot gnu.org
2021-06-19  7:46 ` gcc@t-8ch.de
2021-07-15 17:48 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).