public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name
@ 2013-11-27 21:43 maemarcus at gmail dot com
  2013-11-27 23:25 ` [Bug driver/59321] " hjl.tools at gmail dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: maemarcus at gmail dot com @ 2013-11-27 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59321
           Summary: -fuse-ld does not have effect on -print-prog-name
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: maemarcus at gmail dot com

Many configure scripts e.g. GLIBC use -print-prog-name to check the binary
utils used by GCC. Distros may face need to switch linker between bfd and gold,
which is now possible thanks to -fuse-ld flag. However, -print-prog-name is not
affected by -fuse-ld, and thus may lead to configure checks and actual build
being performed using different linkers.

$ kernelgen-gcc -fuse-ld=gold -print-prog-name=ld
/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld
$ kernelgen-gcc -fuse-ld=bfd -print-prog-name=ld
/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld

I think -fuse-ld should play together with -print-prog-name. In the example
above with default gold, second command should point to kernelgen-ld.bfd


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
@ 2013-11-27 23:25 ` hjl.tools at gmail dot com
  2013-11-28  8:32 ` schwab@linux-m68k.org
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-27 23:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
-print-prog-name=foobar gives the path name of program, foobar.
which isn't necessarily used by the GCC driver:

[hjl@gnu-6 gcc-4.6.3-x32]$ ./bin/gcc -print-prog-name=as  
as
[hjl@gnu-6 gcc-4.6.3-x32]$ ./bin/gcc -print-prog-name=foobar
foobar

Should we consider -print-prog-name=ld as special case?


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
  2013-11-27 23:25 ` [Bug driver/59321] " hjl.tools at gmail dot com
@ 2013-11-28  8:32 ` schwab@linux-m68k.org
  2013-11-28  9:02 ` maemarcus at gmail dot com
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: schwab@linux-m68k.org @ 2013-11-28  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
The driver doesn't actually call ld, but collect2, and passes -fuse-ld down to
it.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
  2013-11-27 23:25 ` [Bug driver/59321] " hjl.tools at gmail dot com
  2013-11-28  8:32 ` schwab@linux-m68k.org
@ 2013-11-28  9:02 ` maemarcus at gmail dot com
  2013-11-28 11:31 ` rguenth at gcc dot gnu.org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: maemarcus at gmail dot com @ 2013-11-28  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from maemarcus at gmail dot com ---
I'm only saying configure scripts use -print-prog-name to determine the linker,
and with introduction of -fuse-ld what's returned there could be inconsistent
with what linker is actually being used.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (2 preceding siblings ...)
  2013-11-28  9:02 ` maemarcus at gmail dot com
@ 2013-11-28 11:31 ` rguenth at gcc dot gnu.org
  2013-11-29 21:01 ` hjl.tools at gmail dot com
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-28 11:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #1)
> -print-prog-name=foobar gives the path name of program, foobar.
> which isn't necessarily used by the GCC driver:
> 
> [hjl@gnu-6 gcc-4.6.3-x32]$ ./bin/gcc -print-prog-name=as  
> as
> [hjl@gnu-6 gcc-4.6.3-x32]$ ./bin/gcc -print-prog-name=foobar
> foobar

This is only the result if a full path cannot be determined.

> gcc -print-prog-name=as
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/as


> Should we consider -print-prog-name=ld as special case?

Not really, -print-prog-name prints the command gcc uses if it were
to use that command.  It won't use 'ld' but 'ld.gold' with -fuse-ld=gold
so -print-prog-name=ld is simply not the correct way to determine which
linker GCC ultimately would use.

Thus you'd want a -print-linker-name.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (3 preceding siblings ...)
  2013-11-28 11:31 ` rguenth at gcc dot gnu.org
@ 2013-11-29 21:01 ` hjl.tools at gmail dot com
  2013-11-29 21:02 ` hjl.tools at gmail dot com
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-29 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 31333
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31333&action=edit
A patch

This patch teaches gcc.c to append .bfd/.gold to ld if
-fuse-ld=XXX is used for --print-prog-name=ld.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (4 preceding siblings ...)
  2013-11-29 21:01 ` hjl.tools at gmail dot com
@ 2013-11-29 21:02 ` hjl.tools at gmail dot com
  2013-11-29 21:10 ` hjl.tools at gmail dot com
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-29 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2013-11-29
         Resolution|INVALID                     |---
     Ever confirmed|0                           |1

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
We can handle -fuse-ld=XXX for -print-prog-name=ld.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (5 preceding siblings ...)
  2013-11-29 21:02 ` hjl.tools at gmail dot com
@ 2013-11-29 21:10 ` hjl.tools at gmail dot com
  2013-11-29 23:04 ` maemarcus at gmail dot com
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-29 21:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
I got

[hjl@gnu-tools-1 gcc-4.9.0]$ ./bin/gcc -print-prog-name=ld -fuse-ld=bfd 
/export/build/gnu/gcc/release/usr/gcc-4.9.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../x86_64-unknown-linux-gnu/bin/ld.bfd
[hjl@gnu-tools-1 gcc-4.9.0]$ ./bin/gcc -print-prog-name=ld -fuse-ld=gold
/export/build/gnu/gcc/release/usr/gcc-4.9.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../x86_64-unknown-linux-gnu/bin/ld.gold
[hjl@gnu-tools-1 gcc-4.9.0]$ ./bin/gcc -print-prog-name=ld 
/export/build/gnu/gcc/release/usr/gcc-4.9.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.0/../../../../x86_64-unknown-linux-gnu/bin/ld
[hjl@gnu-tools-1 gcc-4.9.0]$


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (6 preceding siblings ...)
  2013-11-29 21:10 ` hjl.tools at gmail dot com
@ 2013-11-29 23:04 ` maemarcus at gmail dot com
  2013-11-30  0:47 ` hjl.tools at gmail dot com
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: maemarcus at gmail dot com @ 2013-11-29 23:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from maemarcus at gmail dot com ---
Dear H.J. Lu,

You patch works for me, thanks a lot! I noticed however, that with -fuse-ld ld
from the different location is used for me:

$ kernelgen-gcc -print-prog-name=ld
.../INSTALL/bin/kernelgen-ld
$ kernelgen-gcc -fuse-ld=bfd -print-prog-name=ld
.../INSTALL/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/bin/ld.bfd
$ kernelgen-gcc -fuse-ld=gold -print-prog-name=ld
.../INSTALL/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/bin/ld.gold

I think the patch should first check if newname concatted with suffix exists,
or somehow else deal with possibly prefixed-ld names.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (7 preceding siblings ...)
  2013-11-29 23:04 ` maemarcus at gmail dot com
@ 2013-11-30  0:47 ` hjl.tools at gmail dot com
  2013-11-30  0:58 ` maemarcus at gmail dot com
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30  0:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
This is not what I see with GCC 4.9.0:

[hjl@gnu-tools-1 tools-4.9]$ ls release/usr/gcc-4.9.0/bin/
x86_64-linux-addr2line  x86_64-linux-gcc         x86_64-linux-ld.gold
x86_64-linux-ar         x86_64-linux-gcc-4.9.0   x86_64-linux-nm
x86_64-linux-as         x86_64-linux-gcc-ar      x86_64-linux-objcopy
x86_64-linux-c++        x86_64-linux-gcc-nm      x86_64-linux-objdump
x86_64-linux-c++filt    x86_64-linux-gcc-ranlib  x86_64-linux-ranlib
x86_64-linux-cpp        x86_64-linux-gcov        x86_64-linux-readelf
x86_64-linux-dwp        x86_64-linux-gprof       x86_64-linux-size
x86_64-linux-elfedit    x86_64-linux-ld          x86_64-linux-strings
x86_64-linux-g++        x86_64-linux-ld.bfd      x86_64-linux-strip
[hjl@gnu-tools-1 tools-4.9]$ release/usr/gcc-4.9.0/bin/x86_64-linux-gcc
-print-prog-name=ld
/export/build/gnu/tools-4.9/release/usr/gcc-4.9.0/bin/../lib/gcc/x86_64-linux/4.9.0/../../../../x86_64-linux/bin/ld
[hjl@gnu-tools-1 tools-4.9]$


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (8 preceding siblings ...)
  2013-11-30  0:47 ` hjl.tools at gmail dot com
@ 2013-11-30  0:58 ` maemarcus at gmail dot com
  2013-11-30  2:34 ` hjl.tools at gmail dot com
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: maemarcus at gmail dot com @ 2013-11-30  0:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from maemarcus at gmail dot com ---
Right, I guess the reason of the difference is I'm configured with
--program-prefix=kernelgen-
--with-ld=$RPM_INSTALL_PREFIX/%{prefix}bin/kernelgen-ld
--with-as=$RPM_INSTALL_PREFIX/%{prefix}bin/kernelgen-as

In this case I expect -print-prog-name to add .gold/.bfd suffix to my --with-ld
setting, rather than to .../x86_64-unknown-linux-gnu/bin/ld


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (9 preceding siblings ...)
  2013-11-30  0:58 ` maemarcus at gmail dot com
@ 2013-11-30  2:34 ` hjl.tools at gmail dot com
  2013-11-30  5:43 ` hjl.tools at gmail dot com
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30  2:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31333|0                           |1
        is obsolete|                            |

--- Comment #11 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 31335
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31335&action=edit
An updated patch

Please try this.


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

* [Bug driver/59321] -fuse-ld does not have effect on -print-prog-name
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (10 preceding siblings ...)
  2013-11-30  2:34 ` hjl.tools at gmail dot com
@ 2013-11-30  5:43 ` hjl.tools at gmail dot com
  2013-11-30  5:46 ` [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --program-prefix= hjl.tools at gmail dot com
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30  5:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31335|0                           |1
        is obsolete|                            |

--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 31336
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31336&action=edit
A patch with collect2 fix

This patch also fixes collect2 when --program-prefix= is used
to configure GCC.


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --program-prefix=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (11 preceding siblings ...)
  2013-11-30  5:43 ` hjl.tools at gmail dot com
@ 2013-11-30  5:46 ` hjl.tools at gmail dot com
  2013-11-30  5:46 ` hjl.tools at gmail dot com
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30  5:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-fuse-ld does not have      |-fuse-ld has no effect on
                   |effect on -print-prog-name  |-print-prog-name nor on
                   |                            |--program-prefix=

--- Comment #13 from H.J. Lu <hjl.tools at gmail dot com> ---
When --program-prefix= is used to configure GCC, -fuse-ld
doesn't work since DEFAULT_LINKER is defined.  Patch in
comment 12 also fixes collect2.


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --program-prefix=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (12 preceding siblings ...)
  2013-11-30  5:46 ` [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --program-prefix= hjl.tools at gmail dot com
@ 2013-11-30  5:46 ` hjl.tools at gmail dot com
  2013-11-30 13:51 ` [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld= hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30  5:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (13 preceding siblings ...)
  2013-11-30  5:46 ` hjl.tools at gmail dot com
@ 2013-11-30 13:51 ` hjl.tools at gmail dot com
  2013-11-30 13:53 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|-fuse-ld has no effect on   |-fuse-ld has no effect on
                   |-print-prog-name nor on     |-print-prog-name nor on
                   |--program-prefix=           |--with-ld=

--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #13)
> When --program-prefix= is used to configure GCC, -fuse-ld
> doesn't work since DEFAULT_LINKER is defined.  Patch in
> comment 12 also fixes collect2.

The problem is GCC configured with --with-ld=, which sets
DEFAULT_LINKER.


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (14 preceding siblings ...)
  2013-11-30 13:51 ` [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld= hjl.tools at gmail dot com
@ 2013-11-30 13:53 ` hjl.tools at gmail dot com
  2013-11-30 14:37 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30 13:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #31336|0                           |1
        is obsolete|                            |

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 31338
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31338&action=edit
A patch with collect2 and HOST_EXECUTABLE_SUFFIX fixes

This patch handles collect2 and HOST_EXECUTABLE_SUFFIX.  But
HOST_EXECUTABLE_SUFFIX is untested.


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (15 preceding siblings ...)
  2013-11-30 13:53 ` hjl.tools at gmail dot com
@ 2013-11-30 14:37 ` hjl.tools at gmail dot com
  2013-12-02 11:54 ` maemarcus at gmail dot com
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-11-30 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 31341
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31341&action=edit
A patch with ChangeLog

Add ChangeLog.


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (16 preceding siblings ...)
  2013-11-30 14:37 ` hjl.tools at gmail dot com
@ 2013-12-02 11:54 ` maemarcus at gmail dot com
  2013-12-02 12:50 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: maemarcus at gmail dot com @ 2013-12-02 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from maemarcus at gmail dot com ---
Works as a charm! Many thanks!

$ manual-gcc -print-prog-name=ld
/media/scratch/manual/binutils-2.24.51/build32_glibc/install/bin/manual-ld
$ manual-gcc -fuse-ld=bfd -print-prog-name=ld
/media/scratch/manual/binutils-2.24.51/build32_glibc/install/bin/manual-ld.bfd
$ manual-gcc -fuse-ld=gold -print-prog-name=ld
/media/scratch/manual/binutils-2.24.51/build32_glibc/install/bin/manual-ld.gold


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (17 preceding siblings ...)
  2013-12-02 11:54 ` maemarcus at gmail dot com
@ 2013-12-02 12:50 ` hjl.tools at gmail dot com
  2013-12-19 18:11 ` hjl at gcc dot gnu.org
  2013-12-19 18:12 ` hjl.tools at gmail dot com
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-02 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2013-12/msg00061.html


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (18 preceding siblings ...)
  2013-12-02 12:50 ` hjl.tools at gmail dot com
@ 2013-12-19 18:11 ` hjl at gcc dot gnu.org
  2013-12-19 18:12 ` hjl.tools at gmail dot com
  20 siblings, 0 replies; 22+ messages in thread
From: hjl at gcc dot gnu.org @ 2013-12-19 18:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> ---
Author: hjl
Date: Thu Dec 19 18:11:42 2013
New Revision: 206129

URL: http://gcc.gnu.org/viewcvs?rev=206129&root=gcc&view=rev
Log:
Improve -fuse-ld=[bfd|gold] check

    PR driver/59321
    * collect2.c (main): Check -fuse-ld=[bfd|gold] when
    DEFAULT_LINKER is defined.
    * common.opt (fuse-ld=bfd): Add Driver.
    (fuse-ld=gold): Likewise.
    * gcc.c (use_ld): New variable.
    (driver_handle_option): Set use_ld for OPT_fuse_ld_bfd and
    OPT_fuse_ld_gold.
    (main): Check -fuse-ld=[bfd|gold] for -print-prog-name=ld.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/collect2.c
    trunk/gcc/common.opt
    trunk/gcc/gcc.c


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

* [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=
  2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
                   ` (19 preceding siblings ...)
  2013-12-19 18:11 ` hjl at gcc dot gnu.org
@ 2013-12-19 18:12 ` hjl.tools at gmail dot com
  20 siblings, 0 replies; 22+ messages in thread
From: hjl.tools at gmail dot com @ 2013-12-19 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed.


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

end of thread, other threads:[~2013-12-19 18:12 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 21:43 [Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name maemarcus at gmail dot com
2013-11-27 23:25 ` [Bug driver/59321] " hjl.tools at gmail dot com
2013-11-28  8:32 ` schwab@linux-m68k.org
2013-11-28  9:02 ` maemarcus at gmail dot com
2013-11-28 11:31 ` rguenth at gcc dot gnu.org
2013-11-29 21:01 ` hjl.tools at gmail dot com
2013-11-29 21:02 ` hjl.tools at gmail dot com
2013-11-29 21:10 ` hjl.tools at gmail dot com
2013-11-29 23:04 ` maemarcus at gmail dot com
2013-11-30  0:47 ` hjl.tools at gmail dot com
2013-11-30  0:58 ` maemarcus at gmail dot com
2013-11-30  2:34 ` hjl.tools at gmail dot com
2013-11-30  5:43 ` hjl.tools at gmail dot com
2013-11-30  5:46 ` [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --program-prefix= hjl.tools at gmail dot com
2013-11-30  5:46 ` hjl.tools at gmail dot com
2013-11-30 13:51 ` [Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld= hjl.tools at gmail dot com
2013-11-30 13:53 ` hjl.tools at gmail dot com
2013-11-30 14:37 ` hjl.tools at gmail dot com
2013-12-02 11:54 ` maemarcus at gmail dot com
2013-12-02 12:50 ` hjl.tools at gmail dot com
2013-12-19 18:11 ` hjl at gcc dot gnu.org
2013-12-19 18:12 ` 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).