about summary refs log tree commit diff
path: root/pkgs/tools/misc/shallot
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-29 07:11:33 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-29 07:11:54 +0100
commit1b6b36735453f3a38bb6765b60a033cf10637dbd (patch)
treea36e76ce63455c0b028eb9a1adef801cd6ebd84b /pkgs/tools/misc/shallot
parent0831857a140328c5c40be233eaa73130620a44b2 (diff)
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
Diffstat (limited to 'pkgs/tools/misc/shallot')
-rw-r--r--pkgs/tools/misc/shallot/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/tools/misc/shallot/default.nix b/pkgs/tools/misc/shallot/default.nix
index c3c88a6baf00a..93f67bd2defbf 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/