I have submitted this patch. * toplev.c (process_options): Do not warn when -ffunction-sections and -fprofile are used together.
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) { Thanks, -Sri. On Tue, Dec 4, 2012 at 1:43 PM, Sriraman Tallam <tmsri...@google.com> wrote: > On Tue, Dec 4, 2012 at 1:31 PM, Jeff Law <l...@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 >>