This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Build regression on CentOS-5 [Re: [PATCH 3/3] add -Wold-style-definition]
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 02 Jul 2013 14:54:05 -0600
- Subject: Re: Build regression on CentOS-5 [Re: [PATCH 3/3] add -Wold-style-definition]
- References: <1371494572-26594-1-git-send-email-tromey at redhat dot com> <1371494572-26594-4-git-send-email-tromey at redhat dot com> <20130702080754 dot GA24111 at host2 dot jankratochvil dot net> <87hagcela1 dot fsf at fleche dot redhat dot com>
Tom> As much as I dislike working around old tools, how about the appended?
Grr, wrong version.
Tom
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index aca5dbf..7f6e7b6 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -165,6 +165,8 @@ GDB_WERROR_CFLAGS = $(WERROR_CFLAGS)
GDB_WARN_CFLAGS_NO_FORMAT = `echo " $(GDB_WARN_CFLAGS) " \
| sed "s/ -Wformat-nonliteral / -Wno-format-nonliteral /g"`
+GDB_WARN_CFLAGS_NO_DEFS = `echo " $(GDB_WARN_CFLAGS) " \
+ | sed "s/ -Wold-style-definition / -Wno-old-style-definition /g"`
RDYNAMIC = @RDYNAMIC@
@@ -1580,6 +1582,17 @@ printcmd.o: $(srcdir)/printcmd.c
$(COMPILE.post) $(srcdir)/printcmd.c
$(POSTCOMPILE)
+# ada-exp.c can appear in srcdir, for releases; or in ., for
+# development builds.
+ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
+
+# Some versions of flex give output that triggers
+# -Wold-style-definition.
+ada-exp.o: ada-exp.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_DEFS) \
+ $(COMPILE.post) $(ADA_EXP_C)
+ $(POSTCOMPILE)
+
# Message files. Based on code in gcc/Makefile.in.
# Rules for generating translated message descriptions. Disabled by