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 v2 1/3] Makefiles: Flatten and sort file lists


On 2016-11-22 11:31, Pedro Alves wrote:
On 11/19/2016 04:08 AM, Simon Marchi wrote:

Running the patch through the buildbot found that gdb.base/default.exp
started to fail.  The languages in the error message shown when typing
"set language" have changed order.  We could probably improve gdb so
that it prints them in a stable order, regardless of the order of the
object list passed to the linked, but just fixing the test is easier for
now.

Eh.

Now I feel like I have to do something about it. :)

The least we could do is make sure to keep the languages vector sorted when adding a new language, so the order of printing would be guaranteed to be stable. But I kinda liked that the "special" languages (auto, local, unknown) were placed at the beginning. We can probably keep them at the beginning of the vector with a custom comparator function. WDYT?


 SUBDIR_GCC_COMPILE_SRCS = \
 	compile/compile.c \
+	compile/compile-c-support.c \
 	compile/compile-c-symbols.c \
 	compile/compile-c-types.c \
+	compile/compile-loc2c.c \
 	compile/compile-object-load.c \
 	compile/compile-object-load.h \
 	compile/compile-object-run.c \
-	compile/compile-object-run.h \
-	compile/compile-loc2c.c \
-	compile/compile-c-support.c
+	compile/compile-object-run.h

Unrelated to the patch, but I wonder why we have .h files here?
Probably no good reason.

No idea, but they're not listed anywhere else, so they're probably not checked by check-headers or indexed by tags. I am not familiar with all the features of the Makefile, so I didn't want to start removing stuff I didn't understand.

...
+	$(srcdir)/target/waitstatus.c \
+	${srcdir}/x86-low.c

This last one should come before the dirs.

OK with that fixed.

Ah, it uses curly braces instead of parentheses, so it managed to beat my super fancy sorting script. Fixed locally.

Thanks for reviewing!


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