From 430a0e277ac536f1a41fb26c5bfab9e9bd452894 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 6 Jun 2022 18:51:02 +0100 Subject: [PATCH] ifm: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: libvars.a(vars-freeze-lex.o):src/libvars/vars-freeze-lex.l:23: multiple definition of `line_number'; ifm-main.o:src/ifm-main.c:46: first defined here --- pkgs/tools/graphics/ifm/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/graphics/ifm/default.nix b/pkgs/tools/graphics/ifm/default.nix index 8478395a874..7b9d49b1273 100644 --- a/pkgs/tools/graphics/ifm/default.nix +++ b/pkgs/tools/graphics/ifm/default.nix @@ -13,6 +13,11 @@ stdenv.mkDerivation rec { buildInputs = [ perl tk ]; # perl and wish are not run but written as shebangs. + # Workaround build failure on -fno-common toolchains: + # ld: libvars.a(vars-freeze-lex.o):src/libvars/vars-freeze-lex.l:23: + # multiple definition of `line_number'; ifm-main.o:src/ifm-main.c:46: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + enableParallelBuilding = false; # ifm-scan.l:16:10: fatal error: ifm-parse.h: No such file or directory meta = with lib; {