From 1b8cc52931949616df3292a8f4bb3677d99fa9f7 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 15 May 2022 10:48:34 +0100 Subject: [PATCH] iouyap: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: netmap.o:(.bss+0x20): multiple definition of `sizecheck'; iouyap.o:(.bss+0x20): first defined here --- pkgs/tools/networking/iouyap/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/networking/iouyap/default.nix b/pkgs/tools/networking/iouyap/default.nix index 2367261b522..0b3c8007af6 100644 --- a/pkgs/tools/networking/iouyap/default.nix +++ b/pkgs/tools/networking/iouyap/default.nix @@ -13,6 +13,11 @@ stdenv.mkDerivation rec { buildInputs = [ bison flex ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: netmap.o:(.bss+0x20): multiple definition of `sizecheck'; iouyap.o:(.bss+0x20): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + installPhase = '' install -D -m555 iouyap $out/bin/iouyap; '';