diff --git a/pkgs/development/compilers/flasm/default.nix b/pkgs/development/compilers/flasm/default.nix index 9423f5e15df9..02ee36642397 100644 --- a/pkgs/development/compilers/flasm/default.nix +++ b/pkgs/development/compilers/flasm/default.nix @@ -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 ];