From 50b95670d2922b2f8c30a6c39a8d36fa093314fa Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 15 May 2022 16:11:07 +0100 Subject: [PATCH] jfsutils: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: extract.o:/build/jfsutils-1.1.15/fscklog/extract.c:67: multiple definition of `xchklog_buffer'; display.o:/build/jfsutils-1.1.15/fscklog/display.c:57: first defined here --- pkgs/tools/filesystems/jfsutils/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/filesystems/jfsutils/default.nix b/pkgs/tools/filesystems/jfsutils/default.nix index 290bc3139108..52b8fc4c3c28 100644 --- a/pkgs/tools/filesystems/jfsutils/default.nix +++ b/pkgs/tools/filesystems/jfsutils/default.nix @@ -25,6 +25,12 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libuuid ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: extract.o:/build/jfsutils-1.1.15/fscklog/extract.c:67: multiple definition of + # `xchklog_buffer'; display.o:/build/jfsutils-1.1.15/fscklog/display.c:57: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + meta = with lib; { description = "IBM JFS utilities"; homepage = "http://jfs.sourceforge.net";