devttys0 / sasquatch

510 stars 158 forks source link

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

Open trofi opened 3 years ago

trofi commented 3 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.