[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#957532: mes: ftbfs with GCC-10
From: |
Vagrant Cascadian |
Subject: |
Re: Bug#957532: mes: ftbfs with GCC-10 |
Date: |
Wed, 29 Jul 2020 09:40:29 -0700 |
On 2020-07-27, Vagrant Cascadian wrote:
> Debian has switched to gcc 10 by default for the development releases,
> and that currently breaks building mes.
Apparently, Adding -fcommon to CFLAGS does allow the build to complete.
from https://gcc.gnu.org/gcc-10/porting_to.html:
C language issues
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. If tentative definitions
of particular variables need to be placed in a common block,
__attribute__((__common__)) can be used to force that behavior even in
code compiled without -fcommon. As a workaround, legacy C code where
all tentative definitions should be placed into a common block can be
compiled with -fcommon.
I'm thinking it's appropriate for mes to use -fcommon in this case,
since it uses it's own headers and libc.
live well,
vagrant
signature.asc
Description: PGP signature