3
0
Fork 0
forked from mirrors/nixpkgs

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
This commit is contained in:
Sergei Trofimovich 2022-06-05 20:34:05 +01:00
parent 2c93e9de7c
commit 7320966be6

View file

@ -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/' . )