From 47728bdeb050bd558f697be1b0dd8ee71031dc15 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 8 Jun 2022 09:09:40 +0100 Subject: [PATCH] klystrack: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: libengine_gui.a(gui_menu.o):(.bss+0x0): multiple definition of `menu_t'; objs.release/action.o:(.bss+0x20): first defined here --- pkgs/applications/audio/klystrack/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/audio/klystrack/default.nix b/pkgs/applications/audio/klystrack/default.nix index 5d26397efdb7..362c76a0d4de 100644 --- a/pkgs/applications/audio/klystrack/default.nix +++ b/pkgs/applications/audio/klystrack/default.nix @@ -27,6 +27,12 @@ stdenv.mkDerivation rec { }) ]; + # Workaround build failure on -fno-common toolchains: + # ld: libengine_gui.a(gui_menu.o):(.bss+0x0): multiple definition of + # `menu_t'; objs.release/action.o:(.bss+0x20): first defined here + # TODO: remove it for 1.7.7+ release as it was fixed upstream. + NIX_CFLAGS_COMPILE = "-fcommon"; + buildFlags = [ "PREFIX=${placeholder "out"}" "CFG=release" ]; installPhase = ''