From be02f1b12adee732695d975251ef6fdc675fc9bf Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 21 May 2022 10:04:31 +0100 Subject: [PATCH] foremost: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here --- pkgs/tools/system/foremost/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/system/foremost/default.nix b/pkgs/tools/system/foremost/default.nix index 24f207e95f1..1d0a2fa3188 100644 --- a/pkgs/tools/system/foremost/default.nix +++ b/pkgs/tools/system/foremost/default.nix @@ -11,6 +11,11 @@ stdenv.mkDerivation rec { patches = [ ./makefile.patch ]; + # -fcommon: Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + makeFlags = [ "PREFIX=$(out)" ]; enableParallelBuilding = true;