Ticket #13060: valgrind-3.8.1.p0.diff

File valgrind-3.8.1.p0.diff, 4.3 KB (added by jpflori, 8 years ago)

Spkg diff, for review only.

  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    3939
    4040 * None
    4141
     42== Special Build Instructions ==
     43
     44 * To build on OS X, you need to use Apple's GCC.
     45
     46=== Patches ===
     47
     48 * glibc.patch: support glibc versions posterior to 2.16, taken from
     49   upstream commits r13228 and r13504.
     50
    4251== Changelog ==
    4352
     53=== valgrind-3.8.1.p0 (Jean-Pierre Flori, 7 October 2013) ===
     54 * #13060: support glibc 2.17 and 2.18.
     55
    4456=== valgrind-3.8.1 (Jean-Pierre Flori, 24 December 2012) ===
    4557 * #13060: update Valgrind to version 3.8.1.
    4658
  • new file patches/glibc.patch

    diff --git a/patches/glibc.patch b/patches/glibc.patch
    new file mode 100644
    - +  
     1diff -druN src.orig/configure src/configure
     2--- src.orig/configure  2012-09-18 21:19:23.000000000 +0200
     3+++ src/configure       2013-10-07 22:54:30.530691187 +0200
     4@@ -6604,6 +6604,26 @@
     5        DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
     6        DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
     7        ;;
     8+     2.17)
     9+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.17 family" >&5
     10+$as_echo "2.17 family" >&6; }
     11+
     12+$as_echo "#define GLIBC_2_17 1" >>confdefs.h
     13+
     14+       DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
     15+       DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
     16+       DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
     17+       ;;
     18+     2.18)
     19+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.18 family" >&5
     20+$as_echo "2.18 family" >&6; }
     21+
     22+$as_echo "#define GLIBC_2_18 1" >>confdefs.h
     23+
     24+       DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
     25+       DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
     26+       DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
     27+       ;;
     28      darwin)
     29        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
     30 $as_echo "Darwin" >&6; }
     31@@ -6624,7 +6644,7 @@
     32      *)
     33        { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported version ${GLIBC_VERSION}" >&5
     34 $as_echo "unsupported version ${GLIBC_VERSION}" >&6; }
     35-       as_fn_error "Valgrind requires glibc version 2.2 - 2.16" "$LINENO" 5
     36+       as_fn_error "Valgrind requires glibc version 2.2 - 2.18" "$LINENO" 5
     37        as_fn_error "or Darwin libc" "$LINENO" 5
     38        ;;
     39 esac
     40diff -druN src.orig/configure.in src/configure.in
     41--- src.orig/configure.in       2012-09-18 21:17:32.000000000 +0200
     42+++ src/configure.in    2013-10-07 22:54:21.542757756 +0200
     43@@ -906,6 +906,20 @@
     44        DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
     45        DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
     46        ;;
     47+     2.17)
     48+       AC_MSG_RESULT(2.17 family)
     49+       AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
     50+       DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
     51+       DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
     52+       DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
     53+       ;;
     54+     2.18)
     55+       AC_MSG_RESULT(2.18 family)
     56+       AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x])
     57+       DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
     58+       DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
     59+       DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
     60+       ;;
     61      darwin)
     62        AC_MSG_RESULT(Darwin)
     63        AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
     64@@ -919,7 +933,7 @@
     65 
     66      *)
     67        AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
     68-       AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.16])
     69+       AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.18])
     70        AC_MSG_ERROR([or Darwin libc])
     71        ;;
     72 esac
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    11#!/usr/bin/env bash
    22
    3 VALGRIND_VERSION="3.8.1"
    4 
    5 
    63if [ -z "$SAGE_LOCAL" ] ; then
    74    echo >&2 "Error - SAGE_LOCAL undefined ... exiting"
    85    echo >&2 "Maybe run 'sage -sh'?"
     
    2926
    3027cd src/
    3128
     29for patch in ../patches/*.patch; do
     30    [ -f "$patch" ] || continue
     31    patch -p1 <"$patch"
     32    if [ $? -ne 0 ]; then
     33        echo >&2 "Error applying '$patch'"
     34        exit 1
     35    fi
     36done
     37
    3238./configure --prefix=$SAGE_LOCAL
    3339if [ $? -ne 0 ]; then
    34     echo >&2 "Error configuring Valgrind $VALGRIND_VERSION"
     40    echo >&2 "Error configuring Valgrind"
    3541    exit 1
    3642fi
    3743
    3844$MAKE
    3945if [ $? -ne 0 ]; then
    40     echo >&2 "Error building Valgrind $VALGRIND_VERSION"
     46    echo >&2 "Error building Valgrind"
    4147    exit 1
    4248fi
    4349
    4450$MAKE install
    4551if [ $? -ne 0 ]; then
    46     echo >&2 "Error installing Valgrind $VALGRIND_VERSION"
     52    echo >&2 "Error installing Valgrind"
    4753    exit 1
    4854fi
    4955