From c63ea4e948981ce79fd26f12d14b80ec9d55be01509307eb22177415a4c3322a Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 14 Aug 2013 09:32:27 +0000 Subject: [PATCH] Accepting request 186969 from home:Andreas_Schwab:Factory - valgrind-glibc-2.18.patch: add support for glibc 2.18 OBS-URL: https://build.opensuse.org/request/show/186969 OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=94 --- valgrind-glibc-2.18.patch | 58 +++++++++++++++++++++++++++++++++++++++ valgrind.changes | 5 ++++ valgrind.spec | 2 ++ 3 files changed, 65 insertions(+) create mode 100644 valgrind-glibc-2.18.patch diff --git a/valgrind-glibc-2.18.patch b/valgrind-glibc-2.18.patch new file mode 100644 index 0000000..72eb56d --- /dev/null +++ b/valgrind-glibc-2.18.patch @@ -0,0 +1,58 @@ +Index: valgrind-3.8.1/configure.in +=================================================================== +--- valgrind-3.8.1.orig/configure.in ++++ valgrind-3.8.1/configure.in +@@ -913,6 +913,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.18) ++ AC_MSG_RESULT(2.18 family) ++ AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.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]) +Index: valgrind-3.8.1/coregrind/vgdb.c +=================================================================== +--- valgrind-3.8.1.orig/coregrind/vgdb.c ++++ valgrind-3.8.1/coregrind/vgdb.c +@@ -102,7 +102,6 @@ I_die_here : (PTRACEINVOKER) architectur + #include + #if defined(VGO_linux) + # include +-# include + #endif + #endif + +@@ -696,7 +695,8 @@ static struct user user_save; + // runtime check not yet done. + // 0 : PTRACE_GETREGS runtime check has failed. + // 1 : PTRACE_GETREGS defined and runtime check ok. +-#ifdef PTRACE_GETREGS ++// defines PTRACE_GETREGS as enum, check also for PT_GETREGS ++#if defined PTRACE_GETREGS || defined PT_GETREGS + static int has_working_ptrace_getregs = -1; + #endif + +@@ -707,7 +707,7 @@ static + Bool getregs (int pid, void *regs, long regs_bsz) + { + DEBUG(1, "getregs regs_bsz %ld\n", regs_bsz); +-# ifdef PTRACE_GETREGS ++# if defined PTRACE_GETREGS || defined PT_GETREGS + if (has_working_ptrace_getregs) { + // Platforms having GETREGS + long res; +@@ -778,7 +778,7 @@ Bool setregs (int pid, void *regs, long + DEBUG(1, "setregs regs_bsz %ld\n", regs_bsz); + // Note : the below is checking for GETREGS, not SETREGS + // as if one is defined and working, the other one should also work. +-# ifdef PTRACE_GETREGS ++# if defined PTRACE_GETREGS || defined PT_GETREGS + if (has_working_ptrace_getregs) { + // Platforms having SETREGS + long res; diff --git a/valgrind.changes b/valgrind.changes index cac8312..e3acf46 100644 --- a/valgrind.changes +++ b/valgrind.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 13 15:13:20 UTC 2013 - schwab@suse.de + +- valgrind-glibc-2.18.patch: add support for glibc 2.18 + ------------------------------------------------------------------- Fri Apr 5 09:56:57 UTC 2013 - idonmez@suse.com diff --git a/valgrind.spec b/valgrind.spec index 0b82f22..cae5663 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -41,6 +41,7 @@ Source0: http://valgrind.org/downloads/%{name}-%{version}.tar.bz2 Patch1: jit-register-unregister.diff Patch2: raise-segnames-limit.diff Patch3: valgrind-glibc-2.17.patch +Patch4: valgrind-glibc-2.18.patch # during building the major version of glibc is built into the suppression file %define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1) %define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2) @@ -140,6 +141,7 @@ cd .. %patch1 %patch2 %patch3 -p1 +%patch4 -p1 %build %ifarch %arm