On Tue, 15 Jul 2025, H.J. Lu wrote:
>> This feels a bit complex to parse. How about something like
>>
>> +  <li>The new <code>--enable-x86-64-mfentry</code> configure option
>> +      makes <code>-mfentry</code> use <code>__fentry__</code> instead
>> +      of <code>mcount</code> for profiling on x86-64.  This option is
>> +      enabled by default for glibc targets.
>> +  </li>
>>
>> This replaces "option is added to enable" by "new option makes", fixes
>> grammar/word order and drops what feels like an extra "by default".
> -mfentry is the option to enable __fentry__.   How about this v3 patch?

Sorry, I've been thinking about this multiple times. 

Maybe I misunderstand? Configured with --enable-x86-64-mfentry, GCC will 
always use __fentry__ when -mfentry is used, and mcount otherwise?

This is what (I think) my suggestion above describes.


The way I read your patch

+  <li>The new <code>--enable-x86-64-mfentry</code> configure option
+      enables <code>-mfentry</code> automatically to use
+      <code>__fentry__</code>, instead of <code>mcount</code>, for
+      profiling on x86-64.  This option is enabled by default for
+      glibc targets.
+  </li>

-mfentry *may* use __fentry__, but doesn't have to.


If indeed I misunderstood, please go ahead an push your patch. Just drop 
"automatically" which I believe is superflous (and grammatically at the 
wrong place, should be directly before a verb - either "enables" or 
"use".)

Gerald

Reply via email to