After openSUSE Tumbleweed recently rebuilt with gcc10, the build start to fail with ld errors:
[ 28s] gcc -shared -o libblastem.so libblastem.o system.o genesis.o debug.o gdb_remote.o vdp.o io.o romdb.o hash.o xband.o realtec.o i2c.o nor.o sega_mapper.o multi_game.o megawifi.o net.o serialize.o terminal.o config.o tern.o util.o paths.o gst.o 68kinst.o m68k_core.o m68k_core_x86.o gen.o backend.o mem.o arena.o gen_x86.o backend_x86.o ym2612.o psg.o wave.o saves.o jcart.o rom.db.o sms.o z80inst.o z80_to_x86.o -O2 -flto -lm -m64
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: system.o (symbol from plugin): in function `safe_cmp':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: genesis.o (symbol from plugin): in function `MCLKS_PER_68K':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: debug.o (symbol from plugin): in function `find_breakpoint':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gdb_remote.o (symbol from plugin): in function `hex_32':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: vdp.o (symbol from plugin): in function `init_vdp_context':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: io.o (symbol from plugin): in function `io_port_gamepad_down':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: romdb.o (symbol from plugin): in function `eeprom_read_fun':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: xband.o (symbol from plugin): in function `xband_detect':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: realtec.o (symbol from plugin): in function `realtec_detect':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: i2c.o (symbol from plugin): in function `eeprom_init':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: nor.o (symbol from plugin): in function `nor_flash_init':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: sega_mapper.o (symbol from plugin): in function `read_sram_w':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: multi_game.o (symbol from plugin): in function `write_multi_game_b':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: megawifi.o (symbol from plugin): in function `megawifi_write_b':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: util.o (symbol from plugin): in function `alloc_concat':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gst.o (symbol from plugin): in function `read_le_32':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[ 28s] (.text+0x0): multiple definition of `x86_modes'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[ 28s] (.text+0x0): multiple definition of `x86_size'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[ 28s] (.text+0x0): multiple definition of `x86_cc'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: gen_x86.o (symbol from plugin): in function `jmp_nocheck':
[ 28s] (.text+0x0): multiple definition of `x86_regs'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[ 28s] (.text+0x0): multiple definition of `x86_modes'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[ 28s] (.text+0x0): multiple definition of `x86_size'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[ 28s] (.text+0x0): multiple definition of `x86_cc'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: backend_x86.o (symbol from plugin): in function `cycles':
[ 28s] (.text+0x0): multiple definition of `x86_regs'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: ym2612.o (symbol from plugin): in function `ym_adjust_master_clock':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: psg.o (symbol from plugin): in function `psg_init':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: jcart.o (symbol from plugin): in function `jcart_write_w':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: sms.o (symbol from plugin): in function `debug_commands':
[ 28s] (.text+0x0): multiple definition of `vdp_regs'; libblastem.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[ 28s] (.text+0x0): multiple definition of `x86_modes'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[ 28s] (.text+0x0): multiple definition of `x86_size'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[ 28s] (.text+0x0): multiple definition of `x86_cc'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 28s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: z80_to_x86.o (symbol from plugin): in function `z80_get_native_address':
[ 28s] (.text+0x0): multiple definition of `x86_regs'; m68k_core_x86.o (symbol from plugin):(.text+0x0): first defined here
[ 33s] In function 'mw_putc',
[ 33s] inlined from 'start_reply' at megawifi.c:181:2:
[ 33s] megawifi.c:94:42: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
[ 33s] 94 | mw->receive_buffer[mw->receive_bytes++] = v;
[ 33s] | ^
[ 33s] megawifi.c: In function 'start_reply':
[ 33s] megawifi.c:70:11: note: at offset 4098 to object 'receive_buffer' with size 4096 declared here
[ 33s] 70 | uint8_t receive_buffer[4096];
[ 33s] | ^
[ 37s] collect2: error: ld returned 1 exit status
[ 37s] make[1]: *** [Makefile:270: libblastem.so] Error 1
After openSUSE Tumbleweed recently rebuilt with gcc10, the build start to fail with ld errors: