This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdbserver: Suffix generated C files with -generated


On 2017-03-31 08:23, Pedro Alves wrote:
Hi Simon,

On 03/30/2017 04:31 AM, Simon Marchi wrote:

@@ -8252,7 +8252,7 @@ $as_echo "#define USE_LIBTHREAD_DB_DIRECTLY 1"
>>confdefs.h
 fi

 if test "$srv_xmlfiles" != ""; then
-  srv_xmlbuiltin="xml-builtin.o"
+  srv_xmlbuiltin="xml-builtin-generated.o"

Hmm actually we don't need to rename this, the other .o files are not
named -generated.  You can forget changes to configure/configure.ac (I
removed them locally).

I'm confused on what the result will be. The patch had this in Makefile.in,
for example:

-	version.o \
+	version-generated.o \

Can you post the updated patch?

Ah, yes, same mistake with that one. It probably shouldn't change as well (although it would still work).

To explain the mistake, I first started changing the pattern to have:

  foo-generated.c -> foo-generated.o

But then realized I would have to change everything in configure.srv, and that would be ugly. So I decided to add the "%.o: %-generated.c" and "%-ipa.o: %-generated.c" rules instead, which allows keeping the change to a minimum. I however forgot to change version-generated.o back to version.o and xml-builtin-generated.o to xml-builtin.o. It still works, because they get picked up by the "%.o: %.c" rule.

I'll post the updated patch.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]