From: Simon Marchi Date: Sun, 16 Sep 2018 23:45:06 +0000 (-0400) Subject: Sort objects in gdb and gdbserver Makefiles X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ff03f0bfbf0dc7d125f6ea0b844636c0aba74f6;p=binutils-gdb.git Sort objects in gdb and gdbserver Makefiles 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d36f6cde426..f5c5d213011 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2018-09-16 Simon Marchi + + * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS. + 2018-09-16 Tom Tromey * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF): diff --git a/gdb/Makefile.in b/gdb/Makefile.in index d49f3eef446..87eb825aa99 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/ChangeLog b/gdb/gdbserver/ChangeLog index 67fd15e037b..8e752bc2c4f 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2018-09-16 Simon Marchi + + * Makefile.in (gdbserver$(EXEEXT)): Sort OBS. + (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS. + ($(IPA_LIB)): Sort IPA_OBJS. + 2018-09-16 Simon Marchi * Makefile.in: Remove references to $(ADD_DEPS). diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index c07f84d5120..dfefff91554 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) \