From d8b2dd91e0bf7aba7328f268b20058e281be443e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 6 Jun 2022 18:46:42 +0100 Subject: [PATCH] gargoyle: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: build/linux.release/alan3/Location.o:(.bss+0x0): multiple definition of `logFile'; build/linux.release/alan3/act.o:(.bss+0x0): first defined here --- pkgs/games/gargoyle/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index 7058f680f4e2..f5d23091b482 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -35,6 +35,12 @@ stdenv.mkDerivation rec { buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ] ++ lib.optionals stdenv.isDarwin [ smpeg libvorbis ]; + # Workaround build failure on -fno-common toolchains: + # ld: build/linux.release/alan3/Location.o:(.bss+0x0): multiple definition of + # `logFile'; build/linux.release/alan3/act.o:(.bss+0x0): first defined here + # TODO: drop once updated to 2022.1 or later. + NIX_CFLAGS_COMPILE = "-fcommon"; + buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; installPhase =