From 8bc1f617dd3e1faa2d55d80d06895bb5a08aea0b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 9 Jun 2022 22:59:07 +0100 Subject: [PATCH] squeak: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: vm/vm.a(cogit.o):spur64src/vm/cogitX64SysV.c:2552: multiple definition of `traceStores'; vm/vm.a(gcc3x-cointerp.o):spur64src/vm/cogit.h:140: first defined here --- pkgs/development/compilers/squeak/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/compilers/squeak/default.nix b/pkgs/development/compilers/squeak/default.nix index 55abcbc64dd..5747ce4b607 100644 --- a/pkgs/development/compilers/squeak/default.nix +++ b/pkgs/development/compilers/squeak/default.nix @@ -136,6 +136,11 @@ in stdenv.mkDerivation { --replace '/bin/rm ' '${coreutils}/bin/rm ' ''; + # Workaround build failure on -fno-common toolchains: + # ld: vm/vm.a(cogit.o):spur64src/vm/cogitX64SysV.c:2552: multiple definition of + # `traceStores'; vm/vm.a(gcc3x-cointerp.o):spur64src/vm/cogit.h:140: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + preAutoreconf = '' pushd ./platforms/unix/config > /dev/null ./mkacinc > ./acplugins.m4