{"push_id":1431179724,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"ad02e4fe877f3a874145dd045626501245e65624","before":"7913a64cab3930fe524f0e38f85cfca11bd52dcb","commits":[{"sha":"ad02e4fe877f3a874145dd045626501245e65624","author":{"name":"Simon Marchi","email":"64f757e6d553be2119779d07ae9f1dc4014e138f@polymtl.ca"},"message":"Makefiles: Disable suffix rules and implicit rules\n\nSince we don't use suffix rules nor implicit rules in gdb, we can\ndisable them.  The advantage is a slightly faster make [1].\n\nHere are some numbers about the speedup.  I ran this on my trusty old\nIntel Q6600, so the time numbers are probably higher than what you'd get\non any recent hardware.  I ran \"make\" in the gdb/ directory of an\nalready built repository (configured with --enable-targets=all).  I\nrecorded the time of execution (average of 5).  I then ran \"make -d\" and\nrecorded the number of printed lines, which gives a rough idea of the\nnumber of operations done.\n\nI compared the following configurations, to see the impact of both the\nempty .SUFFIXES target and the empty pattern rules, as well as running\n\"make -r\", which can be considered the \"ideal\" case.\n\n A - baseline\n B - baseline + .SUFFIXES\n C - baseline + pattern rules\n D - baseline + .SUFFIXES + pattern rules\n E - baseline + make -r\n\n config | time (s) | \"make -d\"\n -----------------------------\n    A   |   5.74   |  2396643\n    B   |   1.19   |   298469\n    C   |   2.81   |  1266573\n    D   |   1.13   |   245489\n    E   |   1.01   |   163914\n\nWe can see that the empty .SUFFIXES target has a bigger impact than the\nempty pattern rules, but still it doesn't hurt to disable the implicit\npattern rules as well.\n\nThere are still some mentions of implicit rules I can't get rid of in\nthe \"make -d\" output.  For example, it's trying to build .c files from\n.w files:\n\n  Looking for an implicit rule for '/home/simark/src/binutils-gdb/gdb/infrun.c'.\n  Trying pattern rule with stem 'infrun'.\n  Trying implicit prerequisite '/home/simark/src/binutils-gdb/gdb/infrun.w'.\n\nand trying to build Makefile.in from a bunch of extensions:\n\n  Looking for an implicit rule for 'Makefile.in'.\n  Trying pattern rule with stem 'Makefile.in'.\n  Trying implicit prerequisite 'Makefile.in.o'.\n  Trying pattern rule with stem 'Makefile.in'.\n  Trying implicit prerequisite 'Makefile.in.c'.\n  Trying pattern rule with stem 'Makefile.in'.\n  Trying implicit prerequisite 'Makefile.in.cc'.\n  ... many more ...\n\nIf somebody knows how to disable them, we can do it, but at this point\nthe returns are minimal, so it is not that important.\n\nI verified that both in-tree and out-of-tree builds work.\n\n[1] Switching from explicit rules to pattern rules for files in\n    subdirectories actually made it slower, so this is kind of a way to\n    redeem myself.  But it the end it's faster than it was previously,\n    so it was all worth it. :)\n\ngdb/ChangeLog:\n\n\t* disable-implicit-rules.mk: New file.\n\t* Makefile.in: Include disable-implicit-rules.mk.\n\t* data-directory/Makefile.in: Likewise.\n\t* gnulib/Makefile.in: Likewise.\n\ngdb/doc/ChangeLog:\n\n\t* Makefile.in: Likewise.\n\ngdb/gdbserver/ChangeLog:\n\n\t* Makefile.in: Include disable-implicit-rules.mk.\n\ngdb/testsuite/ChangeLog:\n\n\t* Makefile.in: Include disable-implicit-rules.mk.","distinct":true,"url":"https://api.github.com/repos/wallento/binutils-gdb/commits/ad02e4fe877f3a874145dd045626501245e65624"}]}
{"actor":{"display_login":"wallento"}}