Tweak to allow the use of this Makefile with the ICC compiler.
Patch by Gregory Czajkowski <gregczajkowski@yahoo.com>.
Related to BZ #339542.
git-svn-id: svn://svn.valgrind.org/vex/trunk@2980 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/Makefile-gcc b/Makefile-gcc
index c07bf9b..12bf1ed 100644
--- a/Makefile-gcc
+++ b/Makefile-gcc
@@ -224,11 +224,13 @@
# This is very uggerly. Need to sed out both "xyzzyN" and
# "xyzzy$N" since gcc on different targets emits the constants
# differently -- with a leading $ on x86/amd64 but none on ppc32/64.
+# ICC also emits the constants differently with a leading # #define
pub/libvex_guest_offsets.h:
rm -f auxprogs/genoffsets.s
$(CC) $(CCFLAGS) -O -S -o auxprogs/genoffsets.s \
auxprogs/genoffsets.c
- grep xyzzy auxprogs/genoffsets.s | grep "^#define" \
+ grep xyzzy auxprogs/genoffsets.s | grep "^[# ]*#define" \
+ | sed "s/# #define/#define/g" \
| sed "s/xyzzy\\$$//g" \
| sed "s/xyzzy#//g" \
| sed "s/xyzzy//g" \