mpg321: add -fcommon workaround

Workaround build failure on -fno-common toolchains like upstream
gcc-10. Otherwise build fails as:

    ld: volume.o:/build/mpg321-0.3.2-orig/mpg321.h:119: multiple definition of
      `loop_remaining'; mpg321.o:/build/mpg321-0.3.2-orig/mpg321.h:119: first defined here
This commit is contained in:
Sergei Trofimovich 2022-05-22 14:52:30 +01:00
parent e04ca59317
commit a35a568954

View file

@ -23,6 +23,12 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: volume.o:/build/mpg321-0.3.2-orig/mpg321.h:119: multiple definition of
# `loop_remaining'; mpg321.o:/build/mpg321-0.3.2-orig/mpg321.h:119: first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
configureFlags =
[ ("--enable-alsa=" + (if stdenv.isLinux then "yes" else "no")) ]
++ (lib.optional (defaultAudio != null)