about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorSarah Brofeldt <sbrofeldt@gmail.com>2018-11-28 09:45:40 +0100
committerGitHub <noreply@github.com>2018-11-28 09:45:40 +0100
commit9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90 (patch)
tree0890ae9702f269392929920cf31a518fc8052dbd /pkgs/development
parentac3b358a8ccb42bc116dd08366aa5ab3f252c42b (diff)
parenta067e883b1603baf6298060e54ca4c7112755e96 (diff)
downloadnixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.tar
nixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.tar.gz
nixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.tar.bz2
nixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.tar.lz
nixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.tar.xz
nixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.tar.zst
nixlib-9caab8ff4a1ad36fbc0ab866f1b0f7c15d35ba90.zip
Merge pull request #51107 from srhb/valgrind-coregrind-makefile-race
valgrind: Apply upstream patch for Makefile race in coregrind
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/tools/analysis/valgrind/coregrind-makefile-race.patch41
-rw-r--r--pkgs/development/tools/analysis/valgrind/default.nix2
2 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/tools/analysis/valgrind/coregrind-makefile-race.patch b/pkgs/development/tools/analysis/valgrind/coregrind-makefile-race.patch
new file mode 100644
index 000000000000..cd09f0edff37
--- /dev/null
+++ b/pkgs/development/tools/analysis/valgrind/coregrind-makefile-race.patch
@@ -0,0 +1,41 @@
+From 7820fc268fae4353118b6355f1d4b9e1b7eeebec Mon Sep 17 00:00:00 2001
+From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
+Date: Sun, 28 Oct 2018 18:35:11 +0100
+Subject: [PATCH 1/1] Fix dependencies between libcoregrind*.a and
+ *m_main.o/*m_libcsetjmp.o
+
+The primary and secondary coregrind libraries must be updated
+when m_main.c or m_libcsetjmp.c are changed.
+
+A dependency was missing between libcoregrind*.a and libnolto_coregrind*.a,
+and so tools were not relinked when m_main.c or m_libcsetjmp.c were
+changed.
+---
+ coregrind/Makefile.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
+index 914a270..8de1996 100644
+--- a/coregrind/Makefile.am
++++ b/coregrind/Makefile.am
+@@ -511,6 +511,8 @@ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS += \
+ endif
+ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_LIBADD = \
+     $(libnolto_coregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_OBJECTS)
++libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_DEPENDENCIES = \
++    libnolto_coregrind-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
+ 
+ if VGCONF_HAVE_PLATFORM_SEC
+ libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \
+@@ -531,6 +533,8 @@ libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS += \
+ endif
+ libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_LIBADD = \
+     $(libnolto_coregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_OBJECTS)
++libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_DEPENDENCIES = \
++    libnolto_coregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
+ endif
+ 
+ #----------------------------------------------------------------------------
+-- 
+2.9.3
+
diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix
index a371bc2e0022..df99ecb13bb3 100644
--- a/pkgs/development/tools/analysis/valgrind/default.nix
+++ b/pkgs/development/tools/analysis/valgrind/default.nix
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
     sha256 = "19ds42jwd89zrsjb94g7gizkkzipn8xik3xykrpcqxylxyzi2z03";
   };
 
+  patches = [ ./coregrind-makefile-race.patch ];
+
   outputs = [ "out" "dev" "man" "doc" ];
 
   hardeningDisable = [ "stackprotector" ];