diff mbox

Using -ffunction-sections and -p

Message ID CAAs8Hmzb8qAkuEwaxeBgAq2HsPrTuCpxz3oEvUwQ29x6nC3nKQ@mail.gmail.com
State New
Headers show

Commit Message

Sriraman Tallam Dec. 7, 2012, 10:46 p.m. UTC
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
>>

Comments

Jeff Law Dec. 7, 2012, 10:47 p.m. UTC | #1
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
diff mbox

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)