From d1252d4082d76bfa22e59bf54a40bd346a6c57f6 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 3 Jun 2022 10:51:10 +0100 Subject: [PATCH] perlPackages.MathPari: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: libPARI/libPARI.a(compat.o):(.bss+0x8): multiple definition of `overflow'; Pari.o:(.bss+0x80): first defined here --- pkgs/top-level/perl-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 64acfb6ba9eb..5f77885e1545 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -13436,6 +13436,10 @@ let url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/2.1/pari-${pariversion}.tgz"; sha256 = "1yjml5z1qdn258qh6329v7vib2gyx6q2np0s5ybci0rhmz6z4hli"; }; + # Workaround build failure on -fno-common toolchains: + # ld: libPARI/libPARI.a(compat.o):(.bss+0x8): multiple definition of + # `overflow'; Pari.o:(.bss+0x80): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = "cp ${pari_tgz} pari-${pariversion}.tgz"; makeMakerFlags = "pari_tgz=pari-${pariversion}.tgz"; src = fetchurl {