devttys0 / sasquatch

501 stars 155 forks source link

patches/patch0.txt: fix build on -fno-common toolchains #44

Open trofi opened 2 years ago

trofi commented 2 years ago

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

c++   ./LZMA/lzmalt/*.o unsquashfs.o ... -o sasquatch
ld: unsquash-1.o:squashfs-tools/error.h:34:
  multiple definition of `verbose'; unsquashfs.o:squashfs-tools/error.h:34: first defined here

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

The change splits declaration and definition.