[vbox-dev] problem with new GCC 10

Sérgio Basto sergio at serjux.com
Wed Feb 5 02:47:31 UTC 2020

On Tue, 2020-02-04 at 20:35 -0500, Valdis Klētnieks wrote:
> On Wed, 05 Feb 2020 01:06:27 +0000, S?rgio Basto said:
> > Hi, 
> > Now seems to me, GCC10 forbids multiple definitions , I got at
> > least  3 packages with this 
> > problem (of multiple definitions [1])  but in Virtual Box we have
> > thousand of lines this these [2]
> This is because gcc 10 changes the default to -fno-common.
> I'll let somebody else figure out if it's better to fiddle with
> go through and for each problematic variable, make one instance the
> official one and make all the others 'extern' references to it.
"The easiest way is to add -fcommon to the build flags for the package:

but FWIW it's best to fix it properly by adding extern to the decls
in the headers, as GCC can generate slightly faster code that way."

quoting from Fedora devel mailing list :) 

Sérgio M. B.

More information about the vbox-dev mailing list