ambiguous m32_printer_defs.h rules

Dmitry V. Levin ldv at altlinux.org
Sat Nov 7 23:39:11 UTC 2015


On Sat, Oct 31, 2015 at 05:20:16PM +0300, Dmitry V. Levin wrote:
> On Tue, Oct 27, 2015 at 04:15:57PM -0700, enh wrote:
> > ./bootstrap && ./configure && make is failing for me on x86-64:
> > 
> > In file included from m32_printer_defs.h:51:0,
> >                  from syscall.c:155:
> > m32_printer_decls.h:2:1: error: expected expression before ‘extern’
> >  extern bool m32_fetch_seccomp_fprog(struct tcb *tcp, const long addr, void *p);
> >  ^
> 
> There seems to be some ambiguousness:
> 
> $ grep '^[^ ]*_defs\.h: ' Makefile.am 
> m%_defs.h: $(srcdir_mpers_source_files)
> %_printer_defs.h: $(srcdir_mpers_source_files)
> 
> It works with GNU make, but has to be fixed nevertheless.

I suppose the following patch fixes this issue.
Elvira, are you OK with m32_defs.h -> m32_type_defs.h rename?

diff --git a/.gitignore b/.gitignore
index edcb641..1f99c6a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,19 +48,19 @@ Makefile.in
 
 /libmpers-m32.a
 /libmpers-mx32.a
-/m32_defs.h
 /m32_funcs.h
 /m32_printer_decls.h
 /m32_printer_defs.h
+/m32_type_defs.h
 /mpers-m32
 /mpers-m32.stamp
 /mpers-mx32
 /mpers-mx32.stamp
 /mpers.am
-/mx32_defs.h
 /mx32_funcs.h
 /mx32_printer_decls.h
 /mx32_printer_defs.h
+/mx32_type_defs.h
 /native_printer_decls.h
 /native_printer_defs.h
 /printers.h
diff --git a/Makefile.am b/Makefile.am
index e7922dc..ab31264 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -689,7 +689,7 @@ mpers-m%.stamp: $(srcdir_mpers_source_files) | printers.h
 	done
 	> $@
 
-m%_defs.h: $(srcdir_mpers_source_files)
+m%_type_defs.h: $(srcdir_mpers_source_files)
 	for f in $^; do \
 		sed -n 's/^#include DEF_MPERS_TYPE(\([^)]\+\))/#ifdef MPERS_$(mpers_PREFIX)\1\n# define \1 MPERS_$(mpers_PREFIX)\1\n#endif/p' $$f || exit; \
 	done > $@-t
@@ -740,7 +740,7 @@ strace_LDADD += libmpers-m32.a
 noinst_LIBRARIES += libmpers-m32.a
 libmpers_m32_a_SOURCES = $(mpers_source_files)
 libmpers_m32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_m32 -I$(builddir)/mpers-m32
-mpers_m32_targets = mpers-m32.stamp m32_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
+mpers_m32_targets = mpers-m32.stamp m32_type_defs.h m32_funcs.h m32_printer_decls.h m32_printer_defs.h
 
 BUILT_SOURCES += $(mpers_m32_targets)
 CLEANFILES    += $(mpers_m32_targets)
@@ -755,7 +755,7 @@ strace_LDADD += libmpers-mx32.a
 noinst_LIBRARIES += libmpers-mx32.a
 libmpers_mx32_a_SOURCES = $(mpers_source_files)
 libmpers_mx32_a_CPPFLAGS = $(libmpers_CPPFLAGS) -DMPERS_IS_mx32 -I$(builddir)/mpers-mx32
-mpers_mx32_targets = mpers-mx32.stamp mx32_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
+mpers_mx32_targets = mpers-mx32.stamp mx32_type_defs.h mx32_funcs.h mx32_printer_decls.h mx32_printer_defs.h
 
 BUILT_SOURCES += $(mpers_mx32_targets)
 CLEANFILES    += $(mpers_mx32_targets)
diff --git a/mpers_type.h b/mpers_type.h
index a9d94e1..fe606e8 100644
--- a/mpers_type.h
+++ b/mpers_type.h
@@ -3,10 +3,10 @@
 # define DEF_MPERS_TYPE(args) STRINGIFY(args.h)
 # ifdef MPERS_IS_m32
 #  define MPERS_PREFIX m32_
-#  define MPERS_DEFS "m32_defs.h"
+#  define MPERS_DEFS "m32_type_defs.h"
 # elif defined MPERS_IS_mx32
 #  define MPERS_PREFIX mx32_
-#  define MPERS_DEFS "mx32_defs.h"
+#  define MPERS_DEFS "mx32_type_defs.h"
 # endif
 #else
 # define MPERS_PREFIX


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20151108/06dfc6b1/attachment.bin>


More information about the Strace-devel mailing list