appimagekit.squashfuse: add -fcommon workaround

Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x8):
      multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
This commit is contained in:
Sergei Trofimovich 2022-06-03 14:14:11 +01:00
parent c5516d1d00
commit 3c233ac911

View File

@ -37,6 +37,11 @@ let
cp -v ${appimagekit_src}/lib/libappimage/src/patches/squashfuse_dlopen.[hc] .
'';
# Workaround build failure on -fno-common toolchains:
# ld: libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x8):
# multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
preConfigure = ''
sed -i "/PKG_CHECK_MODULES.*/,/,:./d" configure
sed -i "s/typedef off_t sqfs_off_t/typedef int64_t sqfs_off_t/g" common.h