From 4c33f198e31bd6c95ae7b063bda6a0d6c233946e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 8 Jun 2022 08:32:27 +0100 Subject: [PATCH] fped: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: postscript.o:postscript.h:29: multiple definition of `postscript_params'; fped.o:postscript.h:29: first defined here --- pkgs/applications/science/electronics/fped/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/science/electronics/fped/default.nix b/pkgs/applications/science/electronics/fped/default.nix index f1c458f40d9f..b1244b79a89f 100644 --- a/pkgs/applications/science/electronics/fped/default.nix +++ b/pkgs/applications/science/electronics/fped/default.nix @@ -14,6 +14,11 @@ stdenv.mkDerivation { sha256 = "0xv364a00zwxhd9kg1z9sch5y0cxnrhk546asspyb9bh58sdzfy7"; }; + # Workaround build failure on -fno-common toolchains: + # ld: postscript.o:postscript.h:29: multiple definition of + # `postscript_params'; fped.o:postscript.h:29: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + # This uses '/bin/bash', '/usr/local' and 'lex' by default makeFlags = [ "PREFIX=${placeholder "out"}"