xpwn: add -fcommon workaround

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

    ld: ../ipsw-patch/libxpwn.a(libxpwn.c.o):(.bss+0x4): multiple definition of
      `endianness'; CMakeFiles/xpwn-bin.dir/src/xpwn.cpp.o:(.bss+0x0): first defined here
This commit is contained in:
Sergei Trofimovich 2022-06-03 10:00:35 +01:00
parent c5516d1d00
commit 7595ca654a

View File

@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
sha256 = "1qw9vbk463fpnvvvfgzxmn9add2p30k832s09mlycr7z1hrh3wyf";
};
# Workaround build failure on -fno-common toolchains:
# ld: ../ipsw-patch/libxpwn.a(libxpwn.c.o):(.bss+0x4): multiple definition of
# `endianness'; CMakeFiles/xpwn-bin.dir/src/xpwn.cpp.o:(.bss+0x0): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
preConfigure = ''
rm BUILD # otherwise `mkdir build` fails on case insensitive file systems
sed -r -i \