Skip to contentSkip to conversation

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

PATCH leimaohui 1 participant 1 message Sep 20, 2013

lore
Share & tools
lore

leimaohui

author
#0 lore raw

Sorry, please ignore it

Quoted 7 lines · leimaohui

To all

请各位帮忙review一下以下的patch

In some situations VEX/auxprogs/genoffsets.c will be compiled.But it will

cause a

Quoted 5 lines

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.

Quoted 6 lines

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

Quoted 5 lines

-fno-builtin \

|                               -O -S -o auxprogs/genoffsets.s \
|                                        auxprogs/genoffsets.c
| powerpc-poky-linux-gnuspe-gcc: error: auxprogs/genoffsets.c: No such
| file or
Quoted 8 lines

directory

The patch below will fix the error.

---
 .../valgrind-3.8.1/fix-genoffsets-error.patch      |   24

++++++++++++++++++++

Quoted 5 lines
 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

diff --git

a/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.

Quoted 1 line

patch

b/meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error.patch

Quoted 23 lines

new file mode 100644
index 0000000..463c8d0

meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error new file +18 -0
+++ .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)
Quoted 1 line

'auxprogs/genoffsets.c'; else $(CYGPATH_W) '$(srcdir)/auxprogs/genoffsets.c ';

fi`

Quoted 30 lines
meta/recipes-devtools/valgrind/valgrind-3.8.1/fix-genoffsets-error new file +8 -0
+   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
+
meta/recipes-devtools/valgrind/valgrind_3.8.1.bb +1 -0
index 3520d49..2d36258 100644
@@ -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

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core