From 72ffe3a604d37f8d5581c62870fe0678d9011613 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 14 May 2022 12:50:45 +0100 Subject: [PATCH] _9pfs: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: lib/auth_rpc.o:/build/source/lib/../9pfs.h:35: multiple definition of `logfile'; 9pfs.o:/build/source/9pfs.h:35: first defined here --- pkgs/tools/filesystems/9pfs/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/filesystems/9pfs/default.nix b/pkgs/tools/filesystems/9pfs/default.nix index 03f082a40381..d9c609d7c0a9 100644 --- a/pkgs/tools/filesystems/9pfs/default.nix +++ b/pkgs/tools/filesystems/9pfs/default.nix @@ -24,6 +24,12 @@ stdenv.mkDerivation { buildInputs = [ fuse ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: lib/auth_rpc.o:/build/source/lib/../9pfs.h:35: multiple definition of + # `logfile'; 9pfs.o:/build/source/9pfs.h:35: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + enableParallelBuilding = true; meta = {