This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 1/3] Makefiles: Flatten and sort file lists
- From: Simon Marchi <simon dot marchi at polymtl dot ca>
- To: Pedro Alves <palves at redhat dot com>
- Cc: "gdb-patches at sourceware dot org"@simark.ca
- Date: Tue, 22 Nov 2016 16:01:43 -0500
- Subject: Re: [PATCH v2 1/3] Makefiles: Flatten and sort file lists
- Authentication-results: sourceware.org; auth=none
- References: <20161119040826.28066-1-simon.marchi@polymtl.ca> <20161119040826.28066-2-simon.marchi@polymtl.ca> <bef8fae4-4c94-493e-b5f0-93521f1083f3@redhat.com>
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!