From 1dace77da58628bf29655c033b939daf3670546a Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 22 May 2022 14:47:17 +0100 Subject: [PATCH] mpc123: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: /build/cc566Cj9.o:(.bss+0x0): multiple definition of `mpc123_file_reader'; ao.o:(.bss+0x40): first defined here --- pkgs/applications/audio/mpc123/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/audio/mpc123/default.nix b/pkgs/applications/audio/mpc123/default.nix index 7ce8af1de23a..e247ebeb2b1d 100644 --- a/pkgs/applications/audio/mpc123/default.nix +++ b/pkgs/applications/audio/mpc123/default.nix @@ -12,6 +12,11 @@ stdenv.mkDerivation rec { patches = [ ./use-gcc.patch ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: /build/cc566Cj9.o:(.bss+0x0): multiple definition of `mpc123_file_reader'; ao.o:(.bss+0x40): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + buildInputs = [ gettext libmpcdec libao ]; installPhase =