valgrind: Update to 3.9.0
This commit is contained in:
parent
1a996759a5
commit
bc3c49ce9b
@ -1,24 +1,33 @@
|
||||
{ stdenv, fetchurl, perl, gdb }:
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "valgrind-3.8.1";
|
||||
stdenv.mkDerivation rec {
|
||||
name = "valgrind-3.9.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://valgrind.org/downloads/${name}.tar.bz2";
|
||||
sha256 = "1nsqk70ry3221sd62s4f0njcrncppszs4xxjcak13lxyfq2y0fs7";
|
||||
sha256 = "1w6n5qvxy2ssbczcl1c2yd2ggjn3ipay2hvpn10laly2dfh73bz6";
|
||||
};
|
||||
|
||||
patches = [ ./glibc-2.17.patch ];
|
||||
|
||||
# Perl is needed for `cg_annotate'.
|
||||
# GDB is needed to provide a sane default for `--db-command'.
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildInputs = stdenv.lib.optional (!stdenv.isDarwin) gdb;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patchPhase =
|
||||
# Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666).
|
||||
''
|
||||
echo "getting rid of the \`-arch' GCC option..."
|
||||
find -name Makefile\* -exec \
|
||||
sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \;
|
||||
|
||||
sed -i coregrind/link_tool_exe_darwin.in \
|
||||
-e 's/^my \$archstr = .*/my $archstr = "x86_64";/g'
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
if (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin")
|
||||
then [ "--enable-only64bit" ]
|
||||
else [];
|
||||
stdenv.lib.optional (stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin") "--enable-only64bit";
|
||||
|
||||
postInstall = ''
|
||||
for i in $out/lib/valgrind/*.supp; do
|
||||
@ -43,23 +52,7 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
license = "GPLv2+";
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ eelco ];
|
||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
(if stdenv.isDarwin
|
||||
then {
|
||||
patchPhase =
|
||||
# Apple's GCC doesn't recognize `-arch' (as of version 4.2.1, build 5666).
|
||||
'' echo "getting rid of the \`-arch' GCC option..."
|
||||
find -name Makefile\* -exec \
|
||||
sed -i {} -e's/DARWIN\(.*\)-arch [^ ]\+/DARWIN\1/g' \;
|
||||
|
||||
sed -i coregrind/link_tool_exe_darwin.in \
|
||||
-e 's/^my \$archstr = .*/my $archstr = "x86_64";/g'
|
||||
'';
|
||||
}
|
||||
else {}))
|
||||
|
@ -1,78 +0,0 @@
|
||||
commit 3781ac11ff374b3517011c1710ec517d52f25cd2
|
||||
Author: tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9>
|
||||
Date: Mon Jan 14 09:48:49 2013 +0000
|
||||
|
||||
Accept glibc 2.17 as valid.
|
||||
|
||||
|
||||
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13228 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index e0fb12d..0f3b3df 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -906,6 +906,13 @@ case "${GLIBC_VERSION}" in
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.17)
|
||||
+ AC_MSG_RESULT(2.17 family)
|
||||
+ AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
|
||||
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
||||
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
+ ;;
|
||||
darwin)
|
||||
AC_MSG_RESULT(Darwin)
|
||||
AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
|
||||
@@ -919,7 +926,7 @@ case "${GLIBC_VERSION}" in
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
|
||||
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
|
||||
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.17])
|
||||
AC_MSG_ERROR([or Darwin libc])
|
||||
;;
|
||||
esac
|
||||
diff -ur valgrind-3.8.1/config.h.in valgrind-3.8.1/config.h.in
|
||||
--- valgrind-3.8.1/config.h.in 2013-01-16 17:15:33.531018561 +0100
|
||||
+++ valgrind-3.8.1/config.h.in 2013-01-16 17:19:21.000000000 +0100
|
||||
@@ -48,6 +48,9 @@
|
||||
/* Define to 1 if you're using glibc 2.16.x */
|
||||
#undef GLIBC_2_16
|
||||
|
||||
+/* Define to 1 if you're using glibc 2.17.x */
|
||||
+#undef GLIBC_2_17
|
||||
+
|
||||
/* Define to 1 if you're using glibc 2.2.x */
|
||||
#undef GLIBC_2_2
|
||||
|
||||
diff -ur valgrind-3.8.1/configure valgrind-3.8.1/configure
|
||||
--- valgrind-3.8.1/configure 2013-01-16 17:15:33.563018480 +0100
|
||||
+++ valgrind-3.8.1/configure 2013-01-16 17:19:21.373643238 +0100
|
||||
@@ -6610,6 +6610,16 @@
|
||||
DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
;;
|
||||
+ 2.17)
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5
|
||||
+$as_echo "2.17 family" >&6; }
|
||||
+
|
||||
+$as_echo "#define GLIBC_2_17 1" >>confdefs.h
|
||||
+
|
||||
+ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
|
||||
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
|
||||
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
|
||||
+ ;;
|
||||
darwin)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
|
||||
$as_echo "Darwin" >&6; }
|
||||
@@ -6630,7 +6640,7 @@
|
||||
*)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
|
||||
$as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
|
||||
- as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5
|
||||
+ as_fn_error "Valgrind requires glibc version 2.2 - 2.17" "$LINENO" 5
|
||||
as_fn_error "or Darwin libc" "$LINENO" 5
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user