This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR driver/59321: -fuse-ld has no effect on -print-prog-name nor on --with-ld=


On Thu, Dec 19, 2013 at 8:13 AM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> On Wed, 18 Dec 2013, H.J. Lu wrote:
>
>> On Wed, Dec 18, 2013 at 4:13 PM, Joseph S. Myers
>> <joseph@codesourcery.com> wrote:
>> > On Mon, 2 Dec 2013, H.J. Lu wrote:
>> >
>> >> @@ -3952,6 +3955,10 @@ process_command (unsigned int decoded_options_count,
>> >>            free (fname);
>> >>         continue;
>> >>       }
>> >> +      else if (decoded_options[j].opt_index == OPT_fuse_ld_bfd)
>> >> +     use_ld = ".bfd";
>> >> +      else if (decoded_options[j].opt_index == OPT_fuse_ld_gold)
>> >> +     use_ld = ".gold";
>> >
>> > Is there a reason these options need handling there rather than in the
>> > switch statement in driver_handle_option?
>> >
>>
>> It is because driver_handle_option isn't called for -fuse-ld=gold:
>
> Try adding Driver to the .opt entries for these options.
>

Here is the updated patch.  OK to install?

Thanks.


-- 
H.J.
---
2013-12-19  H.J. Lu  <hongjiu.lu@intel.com>

    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.

Attachment: pr59321.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]