Menu

#217 Fix remaining -fno-common (GCC 10) build errors

v3.x
closed-accepted
gpz
None
bugfix
2020-03-05
2020-03-04
No

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.

1 Attachments

Discussion

  • compyx

    compyx - 2020-03-05

    How did gcc/clang not catch this?

     
    • James Le Cuirot

      James Le Cuirot - 2020-03-05

      I'm not sure what you mean. -fno-common only 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 -fcommon still seems to be the default. I can test it when I get home.

       
  • Greg King

    Greg King - 2020-03-05

    It would be better to change the c128 definition of z80_regs into a comment, and add a note that says that the struct variable is exported by ../c64/cart/cpmcart.c.

     
    • James Le Cuirot

      James Le Cuirot - 2020-03-05

      Good call. Here's a new patch.

      I've tested with Clang now. It defaults to -fcommon as I thought and the patch successfully fixes -fno-common in the same way.

       
  • gpz

    gpz - 2020-03-05

    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).

     
    • James Le Cuirot

      James Le Cuirot - 2020-03-05

      Sorry, just saw this. Can you deal with that separately?

       
  • gpz

    gpz - 2020-03-05

    yeah sure, applied in r37527

     
  • gpz

    gpz - 2020-03-05
    • status: open --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB