diff --git a/pkgs/tools/text/silver-searcher/default.nix b/pkgs/tools/text/silver-searcher/default.nix index 757c65eed848..53146ddd0610 100644 --- a/pkgs/tools/text/silver-searcher/default.nix +++ b/pkgs/tools/text/silver-searcher/default.nix @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { patches = [ ./bash-completion.patch ]; + # Workaround build failure on -fno-common toolchains like upstream + # gcc-10. Otherwise build fails as: + # ld: src/zfile.o:/build/source/src/log.h:12: multiple definition of + # `print_mtx'; src/ignore.o:/build/source/src/log.h:12: first defined here + # TODO: remove once next release has https://github.com/ggreer/the_silver_searcher/pull/1377 + NIX_CFLAGS_COMPILE = "-fcommon"; NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lgcc_s"; nativeBuildInputs = [ autoreconfHook pkg-config ];