Project:Toolchain/Gcc 10 porting notes/fno common

= Overview =

and above flipped a default from to.

This changed code generator to emit globals without explicit initializer from  (via  symbol type) to  (via  symbol type).

= Example =

The problem
will reject multiple definition of global variables starting from :

$ gcc a.c main.c -o main ld: a.o:(.bss+0x0): multiple definition of `a'; main.o:(.data+0x0): first defined here collect2: error: ld returned 1 exit status

The fix (source changes, preferred)
The fix is simple: explicitly mark declarations as such and avoid multiple definitions:

The -fcommon workaround (discouraged)
= Notes =

To reproduce a build failure on older use

= Links =


 * Upstream ticket: https://gcc.gnu.org/PR85678