aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2016-11-30 16:23:59 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2016-11-30 16:23:59 -0500
commitad02e4fe877f3a874145dd045626501245e65624 (patch)
treecebeb6d605d445105b9bc99d1b65783bd69de844 /gdb/doc
parent7913a64cab3930fe524f0e38f85cfca11bd52dcb (diff)
downloadbinutils-ad02e4fe877f3a874145dd045626501245e65624.zip
binutils-ad02e4fe877f3a874145dd045626501245e65624.tar.gz
binutils-ad02e4fe877f3a874145dd045626501245e65624.tar.bz2
Makefiles: Disable suffix rules and implicit rules
Since we don't use suffix rules nor implicit rules in gdb, we can disable them. The advantage is a slightly faster make [1]. Here are some numbers about the speedup. I ran this on my trusty old Intel Q6600, so the time numbers are probably higher than what you'd get on any recent hardware. I ran "make" in the gdb/ directory of an already built repository (configured with --enable-targets=all). I recorded the time of execution (average of 5). I then ran "make -d" and recorded the number of printed lines, which gives a rough idea of the number of operations done. I compared the following configurations, to see the impact of both the empty .SUFFIXES target and the empty pattern rules, as well as running "make -r", which can be considered the "ideal" case. A - baseline B - baseline + .SUFFIXES C - baseline + pattern rules D - baseline + .SUFFIXES + pattern rules E - baseline + make -r config | time (s) | "make -d" ----------------------------- A | 5.74 | 2396643 B | 1.19 | 298469 C | 2.81 | 1266573 D | 1.13 | 245489 E | 1.01 | 163914 We can see that the empty .SUFFIXES target has a bigger impact than the empty pattern rules, but still it doesn't hurt to disable the implicit pattern rules as well. There are still some mentions of implicit rules I can't get rid of in the "make -d" output. For example, it's trying to build .c files from .w files: Looking for an implicit rule for '/home/simark/src/binutils-gdb/gdb/infrun.c'. Trying pattern rule with stem 'infrun'. Trying implicit prerequisite '/home/simark/src/binutils-gdb/gdb/infrun.w'. and trying to build Makefile.in from a bunch of extensions: Looking for an implicit rule for 'Makefile.in'. Trying pattern rule with stem 'Makefile.in'. Trying implicit prerequisite 'Makefile.in.o'. Trying pattern rule with stem 'Makefile.in'. Trying implicit prerequisite 'Makefile.in.c'. Trying pattern rule with stem 'Makefile.in'. Trying implicit prerequisite 'Makefile.in.cc'. ... many more ... If somebody knows how to disable them, we can do it, but at this point the returns are minimal, so it is not that important. I verified that both in-tree and out-of-tree builds work. [1] Switching from explicit rules to pattern rules for files in subdirectories actually made it slower, so this is kind of a way to redeem myself. But it the end it's faster than it was previously, so it was all worth it. :) gdb/ChangeLog: * disable-implicit-rules.mk: New file. * Makefile.in: Include disable-implicit-rules.mk. * data-directory/Makefile.in: Likewise. * gnulib/Makefile.in: Likewise. gdb/doc/ChangeLog: * Makefile.in: Likewise. gdb/gdbserver/ChangeLog: * Makefile.in: Include disable-implicit-rules.mk. gdb/testsuite/ChangeLog: * Makefile.in: Include disable-implicit-rules.mk.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/Makefile.in3
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index a74b4dd..dc8244c 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Makefile.in: Likewise.
+
2016-11-18 Andreas Arnez <arnez@linux.vnet.ibm.com>
* gdb.texinfo (GDB/MI Async Records): Add missing comma after
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 70af0fe..be63c87 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -676,3 +676,6 @@ maintainer-clean realclean: distclean
install: install-info install-man
uninstall: uninstall-info uninstall-man
+
+# Disable implicit make rules.
+include $(srcdir)/../disable-implicit-rules.mk