Skip to contentSkip to conversation

valgrind: Fix compile error about VEX/auxprogs/genoffsets.c

PATCH New leimaohui 1 participant 1 message Sep 20, 2013

lore
Share & tools
lore

leimaohui

author
#0 lore raw

PATCH 1/1 valgrind: Fix compile error about VEX/auxprogs/genoffsets.c

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.

---
 .../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

(quoted diff) +0 -0

patch b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.patch new file mode 100644
index 0000000..463c8d0

meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.patch new file +16 -0
@@ -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
+

(quoted diff) +0 -0

b/meta/recipes-devtools/valgrind/valgrind_3.8.1.bb index 3520d49..2d36258 100644

meta/recipes-devtools/valgrind/valgrind_3.8.1.bb +0 -0
@@ -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 \
           "

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