diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-08-24 10:21:14 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-08-24 10:21:14 +0200 |
commit | e78a0ae514266ae43906d919387d31e2a1a92c8f (patch) | |
tree | 372552155630e92f45c50d210cbde06303caa4f5 | |
parent | 39b04845826069221e6603ff9ee7c462b20946e4 (diff) | |
download | guix-e78a0ae514266ae43906d919387d31e2a1a92c8f.tar guix-e78a0ae514266ae43906d919387d31e2a1a92c8f.tar.gz |
gnu: Add Valgrind.
* gnu/packages/valgrind.scm, gnu/packages/patches/valgrind-glibc.patch:
New files.
* gnu-system.am (GNU_SYSTEM_MODULES): Add valgrind.scm.
(dist_patch_DATA): Add valgrind-glibc.patch.
-rw-r--r-- | gnu-system.am | 2 | ||||
-rw-r--r-- | gnu/packages/patches/valgrind-glibc.patch | 78 | ||||
-rw-r--r-- | gnu/packages/valgrind.scm | 67 |
3 files changed, 147 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am index 91475393ba..5de5c6d06e 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -159,6 +159,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/tmux.scm \ gnu/packages/tor.scm \ gnu/packages/unrtf.scm \ + gnu/packages/valgrind.scm \ gnu/packages/version-control.scm \ gnu/packages/vim.scm \ gnu/packages/vpn.scm \ @@ -220,6 +221,7 @@ dist_patch_DATA = \ gnu/packages/patches/tar-gets-undeclared.patch \ gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ + gnu/packages/patches/valgrind-glibc.patch \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/w3m-fix-compile.patch \ gnu/packages/patches/xpdf-constchar.patch diff --git a/gnu/packages/patches/valgrind-glibc.patch b/gnu/packages/patches/valgrind-glibc.patch new file mode 100644 index 0000000000..bee1abe71f --- /dev/null +++ b/gnu/packages/patches/valgrind-glibc.patch @@ -0,0 +1,78 @@ +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 diff --git a/gnu/packages/valgrind.scm b/gnu/packages/valgrind.scm new file mode 100644 index 0000000000..949f7d9a30 --- /dev/null +++ b/gnu/packages/valgrind.scm @@ -0,0 +1,67 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages valgrind) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix licenses) + #:use-module (gnu packages gdb) + #:use-module (gnu packages perl) + #:use-module (gnu packages)) + +(define-public valgrind + (package + (name "valgrind") + (version "3.8.1") + (source (origin + (method url-fetch) + (uri (string-append "http://valgrind.org/downloads/valgrind-" + version ".tar.bz2")) + (sha256 + (base32 + "1nsqk70ry3221sd62s4f0njcrncppszs4xxjcak13lxyfq2y0fs7")))) + (build-system gnu-build-system) + (arguments + '(#:patches (list (assoc-ref %build-inputs "patch/glibc-2.17")) + #:phases (alist-cons-after + 'install 'patch-suppression-files + (lambda* (#:key outputs #:allow-other-keys) + ;; Don't assume the FHS. + (let* ((out (assoc-ref outputs "out")) + (dir (string-append out "/lib/valgrind"))) + (substitute* (find-files dir "\\.supp$") + (("obj:/lib") "obj:*/lib") + (("obj:/usr/X11R6/lib") "obj:*/lib") + (("obj:/usr/lib") "obj:*/lib")) + #t)) + %standard-phases))) + (inputs `(;; GDB is needed to provide a sane default for `--db-command'. + ("gdb" ,gdb) + + ("patch/glibc-2.17" + ,(search-patch "valgrind-glibc.patch")))) + (native-inputs `(("perl" ,perl))) + (home-page "http://www.valgrind.org/") + (synopsis "Debugging and profiling tool suite") + (description + "Valgrind is an instrumentation framework for building dynamic analysis +tools. There are Valgrind tools that can automatically detect many memory +management and threading bugs, and profile your programs in detail. You can +also use Valgrind to build new tools.") + (license gpl2+))) |