flasm: pull patch pending upstream inclusion for -fno-common toolchains

Without the change build fails on upstream gcc-10 as:

    ld: unflasm.o:/build/source/unflasm.c:32: multiple definition of
      `swfVersion'; flasm.o:/build/source/flasm.c:36: first defined here
This commit is contained in:
Sergei Trofimovich 2022-05-15 10:18:31 +01:00
parent 09692a459c
commit 687decaa2d

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchzip, unzip, bison, flex, gperf, zlib }:
{ lib, stdenv, fetchzip, unzip, fetchpatch, bison, flex, gperf, zlib }:
stdenv.mkDerivation rec {
pname = "flasm";
@ -10,6 +10,16 @@ stdenv.mkDerivation rec {
stripRoot = false;
};
patches = [
# Pull patch pending upstream inclusion for -fno-common toolchains:
# https://sourceforge.net/p/flasm/patches/2/
(fetchpatch {
name = "fno-common.patch";
url = "https://sourceforge.net/p/flasm/patches/2/attachment/0001-flasm-fix-build-on-gcc-10-fno-common.patch";
sha256 = "0ic7k1mmyvhpnxam89dbg8i9bfzk70zslfdxgpmkszx097bj1hv6";
})
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
nativeBuildInputs = [ unzip bison flex gperf ];