buildrootschalter/package/valgrind/valgrind-3.7.0-largefile.patch
Thomas Petazzoni bea251c696 valgrind: bump to 3.7.0 and fix build with ccache
After bumping to 3.7.0, the valgrind-3.6.1-configure-support-linux-3.patch is
no longer necessary since it was added upstream. The
valgrind-3.7.0-compiler-check.patch patch is added to fix a compiler version
check issue (patch taken from the upstream Subversion repository). The
valgrind-3.7.0-fix-ccache-support.patch is added to fix the build process when
ccache is used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-01-02 15:08:11 +01:00

57 lines
2.3 KiB
Diff

[PATCH] valgrind: don't enable largefile support unconditionally on uClibc
uClibc can be compiled without largefile support (and errors out if
_FILE_OFFSET_BITS is set to 64), so don't define it if that combination
is detected.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Index: valgrind-3.7.0/coregrind/m_initimg/initimg-linux.c
===================================================================
--- valgrind-3.7.0.orig/coregrind/m_initimg/initimg-linux.c 2011-10-26 23:24:43.000000000 +0200
+++ valgrind-3.7.0/coregrind/m_initimg/initimg-linux.c 2011-12-22 14:53:12.798185055 +0100
@@ -55,7 +55,11 @@
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
#define _GNU_SOURCE
+#include <features.h>
+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
#define _FILE_OFFSET_BITS 64
+#endif
/* This is for ELF types etc, and also the AT_ constants. */
#include <elf.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
Index: valgrind-3.7.0/coregrind/m_main.c
===================================================================
--- valgrind-3.7.0.orig/coregrind/m_main.c 2011-10-26 23:24:45.000000000 +0200
+++ valgrind-3.7.0/coregrind/m_main.c 2011-12-22 14:53:12.798185055 +0100
@@ -2743,7 +2743,11 @@
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
#define _GNU_SOURCE
+#include <features.h>
+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
#define _FILE_OFFSET_BITS 64
+#endif
/* This is in order to get AT_NULL and AT_PAGESIZE. */
#include <elf.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */
Index: valgrind-3.7.0/coregrind/m_ume/elf.c
===================================================================
--- valgrind-3.7.0.orig/coregrind/m_ume/elf.c 2011-10-26 23:24:41.000000000 +0200
+++ valgrind-3.7.0/coregrind/m_ume/elf.c 2011-12-22 14:53:12.798185055 +0100
@@ -48,7 +48,11 @@
/* --- !!! --- EXTERNAL HEADERS start --- !!! --- */
#define _GNU_SOURCE
+#include <features.h>
+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */
+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__))
#define _FILE_OFFSET_BITS 64
+#endif
/* This is for ELF types etc, and also the AT_ constants. */
#include <elf.h>
/* --- !!! --- EXTERNAL HEADERS end --- !!! --- */