From 12f04ef16e8588c5c2797811b2b21b4dddee670c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 18 May 2022 08:32:06 +0100 Subject: [PATCH] yap: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: libYap.a(pl-dtoa.o):/build/yap-6.3.3/H/pl-yap.h:230: multiple definition of `ATOM_'; libYap.a(pl-buffer.o):/build/yap-6.3.3/H/pl-yap.h:230: first defined here --- pkgs/development/compilers/yap/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/yap/default.nix b/pkgs/development/compilers/yap/default.nix index 4428d4dbba65..10ba3c559015 100644 --- a/pkgs/development/compilers/yap/default.nix +++ b/pkgs/development/compilers/yap/default.nix @@ -13,7 +13,11 @@ stdenv.mkDerivation rec { configureFlags = [ "--enable-tabling=yes" ]; - NIX_CFLAGS_COMPILE = "-fpermissive"; + # -fcommon: workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: libYap.a(pl-dtoa.o):/build/yap-6.3.3/H/pl-yap.h:230: multiple definition of `ATOM_'; + # libYap.a(pl-buffer.o):/build/yap-6.3.3/H/pl-yap.h:230: first defined here + NIX_CFLAGS_COMPILE = "-fpermissive -fcommon"; meta = { homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/";