From b125089f5a8bd6eb1975236a1c2de77a5005cbc9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 12 May 2022 08:22:23 +0100 Subject: [PATCH] alan_2: add -fcommon workaround for gcc-10 Without the change the build against upstream gcc-10 build fails as: ld: smScSema.o:/build/source/compiler/smScSema.c:135: multiple definition of `charset'; options.o:/build/source/compiler/options.c:16: first defined here Use -fcommon as a workeround until upstream updates the code. --- pkgs/development/compilers/alan/2.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/compilers/alan/2.nix b/pkgs/development/compilers/alan/2.nix index e24cc35a9d74..7329a0115d84 100644 --- a/pkgs/development/compilers/alan/2.nix +++ b/pkgs/development/compilers/alan/2.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { makefile = "Makefile.unix"; + # Add a workarounf for -fno-common tollchains like upstream gcc-10. + # alan-3 is already fixed, but the backport is nontrivial. + NIX_CFLAGS_COMPILE = "-fcommon"; + installPhase = '' mkdir -p $out/bin $out/share/alan2 cp compiler/alan $out/bin/alan2