People may recall that I was hoping to build thunderbird using gcc and g++ a little while ago, but gave up on that because the build was taking so much longer. This week I've looked at gentoo to see what options they use.
First, some builds using 4 cores where everything in the system was optimized and hardened. For rust, I'm not convinced that optimizing makes a lot of difference, but the optimizations and hardening in gcc and clang add time to the build. The builds of rust were NOT using CFLAGS or CXXFLAGS other than what is in the book (enable-optimize=-O2). 1. Exactly as the book : 4781 sec 43 SBU 11G build, 173M install 2. Add --disable-debug-symbols : 4010 sec 36 SBU 4.8G build, 173M install Clearly, --disable-debug is NOT the same as --disable-debug-symbols. 3. Add --disable-debug-symbols and --enable-linker=gold 3858 sec 34 SBU 4.8G buld, 171M install So, unlike my past experience with te gold linker in firefox, it is beneficial with thunderbird, at least when using clang. In particular, it saves time. 4. To the above, I tried droppig --disable-debug. 3942 sec 35 SBU 4.8G build, 171M install The build was 5 MB smaller, but slower, maybe normal variation? After this I wanted to try to use gcc and g++ (export CC, CXX). I'll skip measurements from the initial builds because after I thought I'd completed I noticed that my build time for firefox-78.2.0 (remeasuring because of fresher toolchain) on my skylake where I use -O2 and hardening was way out of order. I now think that must have been swapping. I also checked that with the best version (for speed) I could build with my own CFLAGS including -fstack-clash-protection which currently causes clang to barf but may be present in clang-11. This succeeded, using my normal optimized system gcc - 3600 sec 32 SBU 4.9G build, 179M install Anyway, I built binutils anf gcc without passing CFLAGS (i.e. they used '-g -O2') in /opt/toolsO2 and put those at the front of my PATH. I remeasured my SBU, it was a little faster. [ and firefox seemed to consistently be 32 SBU both when the 4-core SBU was measured with the system binutils and gcc, and with the default versions. 5. gcc with --disable-debug-symbols and --enable-linker=gold 2743 sec (!) 26 SBU 4.9G build, 177M install I've no idea whether this amount of timesaving will be typical, but the approach looks worthwhile. 6. gcc with only added --disable-debug-symbols 3590 sec 34 SBU 4.9G build, 177M install It seems that gold is equally beneficial (for time to build) with gcc, which surprised me. 7. gcc with --disable-debug-symbols and --enable-linker=gold, but without --disable-debug. 3627 sec 34 SBU 4.9G build, 177M install. It is not clear if --disable-debug is doing anything useful (the build was 4M bigger without it), but omitting it seems to slow down the build. Normally I would say this is 10.1 material, but with the space savings as much as the time, I wonder. ĸen -- Juliet's version of cleanliness was next to godliness, which was to say it was erratic, past all understanding and was seldom seen. -- Unseen Academicals -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page