Merge pull request #175252 from trofi/workaround-fno-common-for-silver-searcher

silver-searcher: add -fcommon workaround
This commit is contained in:
Sandro
2022-06-03 20:43:01 +02:00
committed by GitHub
@@ -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 ];