[PATCH] Add --enable-default-semantic-interposition to GCC configure

Jeff Law jeffreyalaw@gmail.com
Mon Jun 7 18:01:55 GMT 2021



On 6/6/2021 5:18 PM, Andrew Pinski via Gcc-patches wrote:
> On Sun, Jun 6, 2021 at 4:13 PM Fangrui Song via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>> From: Fangrui Song <i@maskray.me>
>>
>> --enable-default-semantic-interposition=no makes -fPIC default to
>> -fno-semantic-interposition which enables interprocedural optimizations
>> for default visibility non-vague-linkage function definitions.
>>
>> The suppression of interprocedural optimizations and inlining for such
>> functions is the biggest difference between -fPIE/-fPIC.
>> Distributions may want to enable default -fno-semantic-interposition to
>> reclaim the lost performance (e.g. CPython is said to be 27% faster;
>> Clang is 3% faster).
>
> This breaks assumptions across the board.  If software packages want
> to use -fno-semantic-interposition that is one thing.  But distros
> should not be changing the default.  This is just like using
> -ffast-math :).
Some distros already force immediate binding at link time for security 
purposes on a distro-wide basis which, IIUC, does the same thing, but 
without the benefits from a code generation standpoint.

Jeff



More information about the Gcc-patches mailing list