speech-tools: add -fcommon workaround

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

    ld: libestools.a(editline.o):(.bss+0x28): multiple definition of
      `editline_history_file'; libestools.a(siodeditline.o):(.data.rel.local+0x8): first defined here
main
Sergei Trofimovich 2 years ago
parent 2c93e9de7c
commit 7320966be6
  1. 5
      pkgs/development/libraries/speech-tools/default.nix

@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
buildInputs = [ alsa-lib ncurses ];
# Workaround build failure on -fno-common toolchains:
# ld: libestools.a(editline.o):(.bss+0x28): multiple definition of
# `editline_history_file'; libestools.a(siodeditline.o):(.data.rel.local+0x8): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
preConfigure = ''
sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . )
sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . )

Loading…
Cancel
Save