- fix build against glibc 2.14

- require the right version of glibc at runtime

OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=36
This commit is contained in:
Dirk Mueller 2011-08-19 17:24:56 +00:00 committed by Git OBS Bridge
parent dfbe4a1826
commit 4315dffa30
4 changed files with 56 additions and 9 deletions

33
glibc-2.14.diff Normal file
View File

@ -0,0 +1,33 @@
------------------------------------------------------------------------
r11800 | tom | 2011-06-07 23:52:26 +0200 (Di, 07. Jun 2011) | 2 Zeilen
Add glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.
------------------------------------------------------------------------
Index: configure.in
===================================================================
--- configure.in (Revision 11799)
+++ configure.in (Revision 11800)
@@ -779,6 +779,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.14)
+ AC_MSG_RESULT(2.14 family)
+ AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.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}"
+ ;;
aix5)
AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
@@ -792,7 +799,7 @@ case "${GLIBC_VERSION}" in
*)
AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.13])
+ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.14])
AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 GLIBC_VERSION])
AC_MSG_ERROR([or Darwin libc])
;;

View File

@ -1,13 +1,15 @@
Index: valgrind-3.6.1/configure.in
===================================================================
--- valgrind-3.6.1.orig/configure.in
+++ valgrind-3.6.1/configure.in
@@ -220,7 +220,7 @@ case "${host_os}" in
--- configure.in
+++ configure.in
@@ -225,9 +225,9 @@ case "${host_os}" in
kernel=`uname -r`
case "${kernel}" in
- 2.6.*)
+ 2.6.*|3.*)
AC_MSG_RESULT([2.6 family (${kernel})])
AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
- AC_MSG_RESULT([2.6 family (${kernel})])
- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
+ 2.6.*|3.*)
+ AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
+ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
;;
2.4.*)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Aug 19 19:24:37 CEST 2011 - dmueller@suse.de
- fix build against glibc 2.14
- require the right version of glibc at runtime
-------------------------------------------------------------------
Tue Jul 5 13:09:46 UTC 2011 - aj@suse.de

View File

@ -52,6 +52,11 @@ Patch42: vg_bug270851_r2130.patch
Patch43: vg_bug270856_r2136.patch
Patch44: vg_bug270851_r2148.patch
Patch45: valgrind-3.6.1-kernel3.patch
Patch46: glibc-2.14.diff
# hack around stupid rebuilding on openSUSE Factory
# during building the major version of glibc is built into the suppression file
# so we do require the exact same major version to be installed
Requires: glibc = %(getconf GNU_LIBC_VERSION | cut -d' ' -f2)
%if %suse_version <= 1100
Provides: valgrind-devel = %version
@ -166,7 +171,8 @@ cd ..
%patch42
%patch43
%patch44
%patch45 -p1
%patch45
%patch46
%build
export CFLAGS="$RPM_OPT_FLAGS"