Patchwork [1/1] valgrind: Fix compile error about VEX/auxprogs/genoffsets.c

login
register
mail settings
Submitter leimaohui
Date Sept. 20, 2013, 7:23 a.m.
Message ID <00d301ceb5d2$539fbc20$fadf3460$@cn.fujitsu.com>
Download mbox | patch
Permalink /patch/58413/
State New
Headers show

Comments

leimaohui - Sept. 20, 2013, 7:23 a.m.
To all 

    ?????review?????patch



In some situations VEX/auxprogs/genoffsets.c will be compiled.But it will cause
a compile error. 
The error message looks like:

| powerpc-poky-linux-gnuspe-gcc  -m32 -mcpu=8548 -mabi=spe -mspe
-mfloat-gprs=double --sysroot=/yocto/fnst/leimh/ubinux-v14/build/p1020rdb/build.
ubinux-p1020rdb/tmp/sysroots/ubinux-p1020rdb -Wno-long-long -O2 -pipe -g
-feliminate-unused-debug-types -Wno-pointer-sign -fno-stack-protector \
|             -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing \
|             -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith
-Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length
-fno-strict-aliasing -fno-builtin \
|                               -O -S -o auxprogs/genoffsets.s \
|                                        auxprogs/genoffsets.c
| powerpc-poky-linux-gnuspe-gcc: error: auxprogs/genoffsets.c: No such file or
directory


The patch below will fix the error.

Signed-off-by: leimaohui <leimaohui@cn.fujitsu.com>
---
 .../valgrind-3.8.1/fix-genoffsets-error.patch      |   24 ++++++++++++++++++++
 meta/recipes-devtools/valgrind/valgrind_3.8.1.bb   |    1 +
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644
meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.patch

 SRC_URI[md5sum] = "288758010b271119a0ffc0183f1d6e38"
--
1.7.1

Patch

diff --git a/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.
patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.patch
new file mode 100644
index 0000000..463c8d0
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.patch
@@ -0,0 +1,24 @@ 
+diff --git a/Makefile.vex.am b/Makefile.vex.am
+index db16276..e00319b 100644
+--- a/Makefile.vex.am
++++ b/Makefile.vex.am
+@@ -69,17 +69,18 @@ pub/libvex_guest_offsets.h: auxprogs/genoffsets.c \
+               pub/libvex_guest_arm.h \
+               pub/libvex_guest_s390x.h \
+               pub/libvex_guest_mips32.h
++  [ ! -d auxprogs ] && mkdir auxprogs
+   rm -f auxprogs/genoffsets.s
+   $(CC) $(CFLAGS) \
+         $(LIBVEX_CFLAGS) \
+         $(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
+               -O -S -o auxprogs/genoffsets.s \
+-                   auxprogs/genoffsets.c
++                   `if test -f 'auxprogs/genoffsets.c'; then $(CYGPATH_W)
'auxprogs/genoffsets.c'; else $(CYGPATH_W) '$(srcdir)/auxprogs/genoffsets.c
'; fi`
+   grep xyzzy auxprogs/genoffsets.s | grep "^#define" \
+      | sed "s/xyzzy\\$$//g" \
+      | sed "s/xyzzy#//g" \
+      | sed "s/xyzzy//g" \
+-     > pub/libvex_guest_offsets.h
++     > $(srcdir)/pub/libvex_guest_offsets.h
+   rm -f auxprogs/genoffsets.s
+
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.8.1.bb
b/meta/recipes-devtools/valgrind/valgrind_3.8.1.bb
index 3520d49..2d36258 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.8.1.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.8.1.bb
@@ -18,6 +18,7 @@  SRC_URI =
"http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
            file://configure-with-newer-glibc.patch \
            file://sepbuildfix.patch \
+          file://fix-genoffsets-error.patch \
           "