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
This commit is contained in:
Sergei Trofimovich 2022-05-19 15:28:01 +01:00
parent f25d106e1d
commit 5d372d74c6

View File

@ -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