Unity-Technologies / qstat

New official qstat repository
Artistic License 2.0
121 stars 33 forks source link

qstat: fix build failure against gcc-10 #92

Closed trofi closed 4 years ago

trofi commented 4 years ago

On gcc-10 (and gcc-9 -fno-common) build fails as:

gcc ... -o qstat ...
ld: config.o:qstat/display_json.h:24:
  multiple definition of `json_printed'; xform.o:qstat/display_json.h:24: first defined here
ld: config.o:qstat/display_json.h:23:
  multiple definition of `json_encoding'; xform.o:qstat/display_json.h:23: first defined here

gcc-10 will change the default from -fcommon to fno-common: https://gcc.gnu.org/PR85678.

The error also happens if CFLAGS=-fno-common passed explicitly.

Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/706390

stevenh commented 4 years ago

Thanks for the PR!