Patchwork Using -ffunction-sections and -p

login
register
mail settings
Submitter Sriraman Tallam
Date Dec. 7, 2012, 10:46 p.m.
Message ID <CAAs8Hmzb8qAkuEwaxeBgAq2HsPrTuCpxz3oEvUwQ29x6nC3nKQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/204617/
State New
Headers show

Comments

Sriraman Tallam - Dec. 7, 2012, 10:46 p.m.
I have submitted this patch.

        * toplev.c (process_options): Do not warn when -ffunction-sections
        and -fprofile are used together.

     {

Thanks,
-Sri.

On Tue, Dec 4, 2012 at 1:43 PM, Sriraman Tallam <tmsriram@google.com> wrote:
> On Tue, Dec 4, 2012 at 1:31 PM, Jeff Law <law@redhat.com> wrote:
>> On 12/03/2012 01:08 PM, Sriraman Tallam wrote:
>>>
>>> Hi Jeff,
>>>
>>>     Wondering if you got a chance to do this?
>>
>> Hmm, thinking more about this, it couldn't have been a 32 bit HPUX issue.
>> First that port claims to not support -ffunction-sections -- which is true,
>> we can't make arbitrarily named sections, though each function is placed
>> into its own $CODE$ section/subspace.
>>
>> Second, even with each function in its own $CODE$ subspace, profiling works.
>>
>> So it couldn't have been 32 bit HPUX.
>>
>> I think Ian's plan of going forward and see if anyone complains is
>> reasonable.  Regardless, we're talking about OSs that are > 10 years old,.
>> the odds of folks building modern versions of GCC is pretty slim.  The odds
>> they're building modern versions of GCC and care about both
>> function-sections and profiling is probably approaching zero.
>>
>> Jeff
>>
Jeff Law - Dec. 7, 2012, 10:47 p.m.
On 12/07/2012 03:46 PM, Sriraman Tallam wrote:
> I have submitted this patch.
>
>          * toplev.c (process_options): Do not warn when -ffunction-sections
>          and -fprofile are used together.
Approved.  Please install.

jeff

Patch

Index: gcc/toplev.c
===================================================================
--- gcc/toplev.c (revision 194306)
+++ gcc/toplev.c (working copy)
@@ -1478,12 +1478,6 @@  process_options (void)
  }
     }

-  if (flag_function_sections && profile_flag)
-    {
-      warning (0, "-ffunction-sections disabled; it makes profiling
impossible");
-      flag_function_sections = 0;
-    }
-
 #ifndef HAVE_prefetch
   if (flag_prefetch_loop_arrays > 0)