Fix remaining -fno-common (GCC 10) build errors
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
As reported in https://bugs.gentoo.org/710990. You fixed one of them but two remained.
I don't know much about this code base but the x128 binary seems to include x64 code so I put the extern in the x128 code.
How did gcc/clang not catch this?
I'm not sure what you mean.
-fno-commononly became the default in GCC 10 and few people are using it yet. I'm not even using it myself but people have been testing with that flag. As for Clang, I don't generally use it but-fcommonstill seems to be the default. I can test it when I get home.It would be better to change the c128 definition of
z80_regsinto a comment, and add a note that says that the struct variable is exported by../c64/cart/cpmcart.c.Good call. Here's a new patch.
I've tested with Clang now. It defaults to
-fcommonas I thought and the patch successfully fixes-fno-commonin the same way.both is a bit questionable (and shows a design problem in the code)... what if the z80 cartridge is used in x128? (that is not possible right now, of course).
Sorry, just saw this. Can you deal with that separately?
yeah sure, applied in r37527