On Tue, Jul 2, 2019 at 3:28 AM Tadeus Prastowo <tadeus.prastowo@xxxxxxxx> wrote: > However, if I applied four more patches to the previous patched & > reconfigured vanilla GCC and rebuilt it in the same way as shown > below, the resulting executable could run faster than Ubuntu GCC: > $ cd /home/eus/buildzone/gcc-9 > $ for x in gcc-default-fortify-source libffi-ro-eh_frame_sect pr67590 > sys-auxv-header; do patch -p2 < > ../ubuntu/gcc-9-9.1.0/debian/patches/$x.diff || break; done I determined that only gcc-default-fortify-source sped things up, which is counterintuitive. So... > The question is: what are so special about the applied patches, which > are also attached in this e-mail except for svn-updates due to its > size? > > 1. svn-updates (this exists in trunk; so IMO nothing special here) > > 2. skip-bootstrap-multilib (this is to fix [9], but may also help > provide better training data for profiledbootstrap) > > 3. libstdc++-pic (any idea why libstdc++ with PIC is faster?) > > 4. gcc-hash-style-gnu (this is needed to be able to apply the next > patch, but can GNU hash style really speed things up?) > > 5. gcc-as-needed (any idea why the linker option `--as-needed' can > speed up compilation?) > > 6. gcc-search-prefixed-as-ld (any idea why this matters?) > > 7. libgomp-omp_h-multilib (I guess this may provide better training > data for profiledbootstrap, but any better idea?) > > 8. libffi-race-condition (any idea why C++ compilation needs to use libffi?) > > 9. libffi-pax (any idea why this speeds things up?) > > 10. libitm-no-fortify-source (I think this is related to the use of > libgomp, but any better idea?) > > 11. t-libunwind-elf-Wl-z-defs (why stripping defs from libunwind can > speed things up?) > > 12. gcc-default-relro (why does relro speed things up?) > > 13. gcc-auto-build (why using `-DGENERATOR_FILE' in CFLAGS is good for speed?) > > 14. gcc-target-include-asm (why using `-isystem $(CURDIR)/sys-include' > is a good idea?) > > 15. gcc-default-fortify-source (isn't it counterintuitive that > fortifying source speeds things up?) > > What do you think about those patches? > > Thank you very much. -- Best regards, Tadeus