[Goodies-dev] [Bug 16798] compilation with gcc 10 breaks functionality (CPU Frequency Monitor fails to run)

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sun May 3 11:20:10 CEST 2020


https://bugzilla.xfce.org/show_bug.cgi?id=16798

Raphael Groner <projects.rg at smart.ms> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|Medium                      |High
           Severity|normal                      |critical

--- Comment #1 from Raphael Groner <projects.rg at smart.ms> ---
Red Hat provides a patch to avoid confusion in gcc10:

https://src.fedoraproject.org/rpms/xfce4-cpufreq-plugin/raw/92599dc0a55fc31e1090c876810b13a1c51bdc67/f/xfce4-cpufreq-plugin-1.2.1-gcc10-common.patch

Jonathan Wakely 2020-05-03 10:11:02 CEST
It looks like the problem is due to this change in GCC:

"GCC now defaults to -fno-common. As a result, global variable accesses are
more efficient on various targets. In C, global variables with multiple
tentative definitions now result in linker errors. With -fcommon such
definitions are silently merged during linking."

Your change to the spec file changes the variable from multiple definitions to
*no* definitions (just declarations).

You need to declare it in the header, and define it in exactly one file, as
explained at https://gcc.gnu.org/gcc-10/porting_to.html#common

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Goodies-dev mailing list