[igt-dev] [PATCH i-g-t 4/4] meson: Add -fcommon to cc_flags
Petri Latvala
petri.latvala at intel.com
Tue Mar 17 06:34:15 UTC 2020
On Mon, Mar 16, 2020 at 12:11:32PM -0400, Lyude wrote:
> From: Lyude Paul <lyude at redhat.com>
>
> Now that we've fixed a bunch of build breakages on systems where
> -fcommon is the default (gcc 10+), let's start building with -fcommon by
> default so we can make sure things don't break with this in the future.
> Supposedly it's supposed to be able to generate better code anyway!
The documentation claims otherwise, "on many targets implies a speed
and code size penalty on global variable references". In fact the
documentation even claims you get the multiple definition errors for
variables with -fno-common and -fcommon helps avoiding them in legacy
code! It's completely backwards to what happens. Oh well.
With that said, the code was clearly wrong, thanks for the series.
>
> Signed-off-by: Lyude Paul <lyude at redhat.com>
Acked-by: Petri Latvala <petri.latvala at intel.com>
What this series proves is that no one is able to understand how
tentative definitions and tentative declarations work in C.
--
Petri Latvala
More information about the igt-dev
mailing list