From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>
Subject: [PATCH 2/2] Sort objects in gdb and gdbserver Makefiles
Date: Sun, 16 Sep 2018 12:51:00 -0000 [thread overview]
Message-ID: <20180916125141.6672-2-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20180916125141.6672-1-simon.marchi@polymtl.ca>
Tom mentioned this a while ago, as a way to give you a cheap sense of
progression in your build, as all object files will be built
alphabetically (including the directory part). I tried it and I think
it's nice.
gdb/ChangeLog:
* Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
gdb/gdbserver/ChangeLog:
* Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
(gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
($(IPA_LIB)): Sort IPA_OBJS.
---
gdb/Makefile.in | 2 +-
gdb/gdbserver/Makefile.in | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index d49f3eef446e..87eb825aa991 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1888,7 +1888,7 @@ stamp-init: $(INIT_FILES)
# against that.
#
# init.o is very important. It pulls in the rest of GDB.
-LIBGDB_OBS = $(COMMON_OBS) init.o
+LIBGDB_OBS = $(sort $(COMMON_OBS)) init.o
libgdb.a: $(LIBGDB_OBS)
-rm -f libgdb.a
$(AR) q libgdb.a $(LIBGDB_OBS)
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index c07f84d51209..dfefff915545 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -395,7 +395,7 @@ install-html:
clean-info: force
@$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do
-gdbserver$(EXEEXT): $(OBS) ${CDEPS} $(LIBGNU) $(LIBIBERTY)
+gdbserver$(EXEEXT): $(sort $(OBS)) ${CDEPS} $(LIBGNU) $(LIBIBERTY)
$(SILENCE) rm -f gdbserver$(EXEEXT)
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
-o gdbserver$(EXEEXT) $(OBS) $(LIBGNU) $(LIBIBERTY) \
@@ -406,7 +406,7 @@ all-lib: $(GNULIB_BUILDDIR)/Makefile $(LIBIBERTY_BUILDDIR)/Makefile
@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS="$(SUBDIRS)" subdir_do
.PHONY: all-lib
-gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU) $(LIBIBERTY)
+gdbreplay$(EXEEXT): $(sort $(GDBREPLAY_OBS)) $(LIBGNU) $(LIBIBERTY)
$(SILENCE) rm -f gdbreplay$(EXEEXT)
$(ECHO_CXXLD) $(CC_LD) $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
-o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) $(XM_CLIBS) $(LIBGNU) \
@@ -430,7 +430,7 @@ IPA_OBJS = \
IPA_LIB = libinproctrace.so
-$(IPA_LIB): $(IPA_OBJS) ${CDEPS}
+$(IPA_LIB): $(sort $(IPA_OBJS)) ${CDEPS}
$(SILENCE) rm -f $(IPA_LIB)
$(ECHO_CXXLD) $(CC_LD) -shared -fPIC -Wl,--soname=$(IPA_LIB) \
-Wl,--no-undefined $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) \
--
2.18.0
next prev parent reply other threads:[~2018-09-16 12:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 12:51 [PATCH 1/2] gdbserver/Makefile.in: Remove ADD_DEPS Simon Marchi
2018-09-16 12:51 ` Simon Marchi [this message]
2018-09-16 14:12 ` [PATCH 2/2] Sort objects in gdb and gdbserver Makefiles Tom Tromey
2018-09-16 20:08 ` Tom Tromey
2018-09-17 0:40 ` Simon Marchi
2018-09-17 3:46 ` Tom Tromey
2018-09-16 14:10 ` [PATCH 1/2] gdbserver/Makefile.in: Remove ADD_DEPS Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180916125141.6672-2-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox