From 1b6b36735453f3a38bb6765b60a033cf10637dbd Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 29 May 2022 07:11:33 +0100 Subject: [PATCH] shallot: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: src/shallot.o:(.bss+0x8): multiple definition of `lucky_thread'; src/error.o:(.bss+0x8): first defined here --- pkgs/tools/misc/shallot/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/misc/shallot/default.nix b/pkgs/tools/misc/shallot/default.nix index c3c88a6baf0..93f67bd2def 100644 --- a/pkgs/tools/misc/shallot/default.nix +++ b/pkgs/tools/misc/shallot/default.nix @@ -30,6 +30,11 @@ stdenv.mkDerivation rec { }) ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: src/shallot.o:(.bss+0x8): multiple definition of `lucky_thread'; src/error.o:(.bss+0x8): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + installPhase = '' mkdir -p $out/bin cp ./shallot $out/bin/