This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Add -plugin-save-temps
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Fri, 26 Jan 2018 14:07:41 -0800
- Subject: Re: PATCH: Add -plugin-save-temps
- Authentication-results: sourceware.org; auth=none
- References: <20110515211503.GA32710@intel.com> <20110516142118.GG20800@bubble.grove.modra.org> <BANLkTinOQOEaFKBv=NAXhzZo1Mo0fA++Mw@mail.gmail.com> <20110516152047.GI20800@bubble.grove.modra.org> <BANLkTikhVyY=WjU1ORK7LLXHzTV+0Wb_KA@mail.gmail.com> <20110518114649.GN20800@bubble.grove.modra.org>
On Wed, May 18, 2011 at 4:46 AM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, May 16, 2011 at 08:41:09AM -0700, H.J. Lu wrote:
>> On Mon, May 16, 2011 at 8:20 AM, Alan Modra <amodra@gmail.com> wrote:
>> > On Mon, May 16, 2011 at 07:35:35AM -0700, H.J. Lu wrote:
>> >> On Mon, May 16, 2011 at 7:21 AM, Alan Modra <amodra@gmail.com> wrote:
>> >> > On Sun, May 15, 2011 at 02:15:03PM -0700, H.J. Lu wrote:
>> >> >> (plugin_call_cleanup): Don't call plugin cleanup_handler if
>> >> >> plugin_save_temps is true.
>> >> >
>> >> > Isn't this really just covering for gcc -save-temps bugs?
>> >> >
>> >>
>> >> It isn't straight forward since LTO plugin is invoked by linker,
>> >> not gcc driver. Ultimately LTO cleanup is controlled by linker.
>> >
>> > Yes, but lto-wrapper modifies its cleanup according to whether
>> > COLLECT_GCC_OPTIONS contains -save-temps. Why can't lto-plugin do the
>> > same?
>>
>> 1. It doesn't solve the problem for existing GCC.
>> 2. To debug linker LTO bugs, we don't need other GCC
>> intermediate files.
>
> Both true, but it's easy to get the object files if you are in the
> middle of a debug session.
> a) I'd rather not have another linker switch to work around what looks
> like a gcc bug to me, and
> b) The plugin cleanup handler might have other duties besides deleting
> temporary files in some future version.
>
I, and other people, have been using this patch to debug linker LTO issues
many times. I can keep carrying it on my local branch. I just want to check
if people think this should be on master branch this time.
--
H.J.