From 6c60d3d38ac1512df424ea474dc9e71373b2fe80 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 9 May 2022 08:18:31 +0100 Subject: [PATCH] gqview: add -fcommon workaround Without the change build fails on -fno-common toolchains like upstream gcc-10 as: $ nix build -L --impure --expr 'with import ./. {}; gqview.overrideAttrs (oa: { NIX_CFLAGS_COMPILE = (["-fno-common"] ++ [oa.NIX_CFLAGS_COMPILE or ""]); })' ... ld: pan-view.o:/build/gqview-2.1.5/src/bar_exif.h:27: multiple definition of `bar_exif_key_list'; bar_exif.o:/build/gqview-2.1.5/src/bar_exif.h:27: first defined here --- pkgs/applications/graphics/gqview/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gqview/default.nix b/pkgs/applications/graphics/gqview/default.nix index 427429404a0..3dbd1e0d77b 100644 --- a/pkgs/applications/graphics/gqview/default.nix +++ b/pkgs/applications/graphics/gqview/default.nix @@ -15,6 +15,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; + NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = "-lm"; meta = with lib; {