Fix to compile with GCC v10

Bug #1860756 reported by Tilmann Bubeck
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
FoxtrotGPS
Fix Committed
Undecided
Unassigned

Bug Description

use "static" before dialog10 to fix this problem with gcc 10:

https://gcc.gnu.org/gcc-10/porting_to.html#common

"Default to -fno-common

A common mistake in C is omitting extern when declaring a global variable in a header file. If the header is included by several files it results in multiple definitions of the same variable. In previous GCC versions this error is ignored. GCC 10 defaults to -fno-common, which means a linker error will now be reported. To fix this, use extern in header files when declaring global variables, and ensure each global is defined in exactly one C file. As a workaround, legacy C code can be compiled with -fcommon.

Revision history for this message
Tilmann Bubeck (tilmannbubeck) wrote :
Revision history for this message
Paul Wise (Debian) (pabs) wrote : Re: [Bug 1860756] [NEW] Fix to compile with GCC v10

Thanks for the patch.

Could you indicate how you want your commit attributed in the commit
log? Normally we use a name and email address. You don't seem to have a
public email address listed on Launchpad. Is there an email address you
would like to use for this? Please note it will be exposed publicly. As
an alternative I can use either your Launchpad login or a link to your
Launchpad user page or just leave out the email address.

I suggest that we use this commit message for the change, does that
seem acceptable to you?

    Convert dialog10 variables to static variables

    This fixes a build failure with the GCC 10 linker,
    which requires all variables to either be static
    or unique within a single linking unit.

    See-also: https://gcc.gnu.org/gcc-10/porting_to.html#common

--
bye,
pabs

https://wiki.debian.org/PaulWise

Revision history for this message
Paul Wise (Debian) (pabs) wrote :

This patch was committed a while ago:

https://bazaar.launchpad.net/~foxtrotgps-team/foxtrotgps/trunk/revision/323

 status fixcommitted

--
bye,
pabs

https://wiki.debian.org/PaulWise

Revision history for this message
Paul Wise (Debian) (pabs) wrote :

 status fixcommitted

Changed in foxtrotgps:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.