From 5d372d74c6ae325d433bcd3da611e86801b20bda Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 19 May 2022 15:28:01 +0100 Subject: [PATCH] bristol: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: brightonCLI.o:/build/bristol-0.60.11/brighton/brightonCLI.c:139: multiple definition of `event'; brightonMixerMenu.o:/build/bristol-0.60.11/brighton/brightonMixerMenu.c:1182: first defined here --- pkgs/applications/audio/bristol/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/audio/bristol/default.nix b/pkgs/applications/audio/bristol/default.nix index 0c9248b5f0b..b96155cf688 100644 --- a/pkgs/applications/audio/bristol/default.nix +++ b/pkgs/applications/audio/bristol/default.nix @@ -19,6 +19,12 @@ stdenv.mkDerivation rec { configurePhase = "./configure --prefix=$out --enable-jack-default-audio --enable-jack-default-midi"; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: brightonCLI.o:/build/bristol-0.60.11/brighton/brightonCLI.c:139: multiple definition of + # `event'; brightonMixerMenu.o:/build/bristol-0.60.11/brighton/brightonMixerMenu.c:1182: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + preInstall = '' sed -e "s@\`which bristol\`@$out/bin/bristol@g" -i bin/startBristol sed -e "s@\`which brighton\`@$out/bin/brighton@g" -i bin/startBristol