diff --git a/pkgs/by-name/gp/gperftools/mingw-disable-benchmarks.patch b/pkgs/by-name/gp/gperftools/mingw-disable-benchmarks.patch new file mode 100644 index 000000000000..647faee4ec47 --- /dev/null +++ b/pkgs/by-name/gp/gperftools/mingw-disable-benchmarks.patch @@ -0,0 +1,21 @@ +diff --git a/Makefile.am b/Makefile.am +index 52d5e2b..62b8ae6 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -523,6 +523,8 @@ debugallocation_test_LDADD = libtcmalloc_debug.la libgtest.la + + endif WITH_DEBUGALLOC + ++if !MINGW ++ + noinst_LTLIBRARIES += librun_benchmark.la + librun_benchmark_la_SOURCES = \ + benchmark/run_benchmark.cc +@@ -552,8 +554,7 @@ binary_trees_shared_SOURCES = benchmark/binary_trees.cc + binary_trees_shared_LDFLAGS = $(TCMALLOC_FLAGS) $(AM_LDFLAGS) + binary_trees_shared_LDADD = libtcmalloc_minimal.la + +-if !MINGW + if WITH_HEAP_PROFILER_OR_CHECKER + + noinst_PROGRAMS += malloc_bench_shared_full diff --git a/pkgs/by-name/gp/gperftools/package.nix b/pkgs/by-name/gp/gperftools/package.nix index 5dc08804834a..a5888096c827 100644 --- a/pkgs/by-name/gp/gperftools/package.nix +++ b/pkgs/by-name/gp/gperftools/package.nix @@ -25,6 +25,9 @@ stdenv.mkDerivation (finalAttrs: { url = "https://src.fedoraproject.org/rpms/gperftools/raw/88ce8ee43a12b1a8146781a1b4d9abbd8df8af0e/f/gperftools-2.17-disable-generic-dynamic-tls.patch"; hash = "sha256-IOLUf9mCEA+fVSJKU94akcnXTIm7+t+S9cjBHsEDwFA="; }) + ] + ++ lib.optionals stdenv.hostPlatform.isMinGW [ + ./mingw-disable-benchmarks.patch ]; nativeBuildInputs = [ autoreconfHook ];