libagar_test: add -fcommon workaround

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

    ld: textdlg.o:(.bss+0x0): multiple definition of `someString';
      configsettings.o:(.bss+0x0): first defined here
This commit is contained in:
Sergei Trofimovich 2022-06-05 20:04:21 +01:00
parent 49c4223e98
commit c7104a2e5d

View file

@ -7,6 +7,12 @@ stdenv.mkDerivation {
sourceRoot = "agar-1.5.0/tests";
# Workaround build failure on -fno-common toolchains:
# ld: textdlg.o:(.bss+0x0): multiple definition of `someString';
# configsettings.o:(.bss+0x0): first defined here
# TODO: the workaround can be removed once nixpkgs updates to 1.6.0.
NIX_CFLAGS_COMPILE = "-fcommon";
preConfigure = ''
substituteInPlace configure.in \
--replace '_BSD_SOURCE' '_DEFAULT_SOURCE'