Packages and notes for what I'm building in my tuning experiments. The initial builds where I persuade everything I build to use my CFLAGS ----------------------------------------------------------------------- For a long time I've passed CFLAGS='-O2' to my normal builds, and the same for CXXFLAGS, to try to reduce the amount of debugging information which gets created. For the last year or so I've also passed -march=native : think of that as my "This one goes up to eleven." moment :) A few weeks ago, I read some interesting suggestions about tuning the compiler, Some of those suggestions were related to LTO (link-time-optimization) which might now be at a point where it can be generally used. Other suggestions were for hardening the build so that it becomes much more difficult for intruders to exploit vulnerabilities. And some other suggestions implied that, at least on intel machines, some other options might noticeably improve the run-time experience. This is my initial set of notes, showing what I built, and in what order (for individual packages which are in BLFS, my options often differ from the book), and what I had to do to see that my options were used. The great thing about using -march=native is that no package will use it by default, so if it shows in the build then I can see that my CFLAGS or CXXFLAGS are being used. For almost every cmake and meson package, I have switched to a release build and for cmake I have modified my CFLAGS accordingly (strip any -O because mine come after the package's CFLAGS). And for some other packages I have decided to strip my own optimization setting because the package defaults to using -O3. In general, I have made verbose cmake and meson builds, to be sure what gets generated. Some conventional CMMI packages report the CFLAGS, for those I have not tended to to force verbose builds if they are not already verbose. Please note that I have no interest, at least for now, in trying to tune LLVM. I've ignored various items in my build which are either scripts of my own, or bootscripts. And when I say 'my flags' or 'my CFLAGS', that's usually a shorthand for 'my CFLAGS and CXXFLAGS'. Wherever I strip out -g, my intention is that this should be conditionalized so that I don't alter the defaults if building without CFLAGS. Clearly, where I make release builds of cmake or meson packages, I'll still strip out the debug stuff. And wherever a package uses some assembler, there is clearly nothing I can do to tune that to a particular machine. The package versions are frozen as at 2019-04-20 when I finished updating my scripts against the BLFS book, and my non-BLFS packages only get updated rarely. It is also possible that I've accidentally failed to update something. However, the following have been updated: 1. icewm-1.5.4 : my favourite wm, this version appeared in BLFS at a convenient time (the intial review of what I built, to see if it used my CFLAGS, and then reviewing each stage of the initial build to check it all looked good, took a very long time. 2. exiv2-0.27.1 - I needed to test my nufraw patches against this: I think they are ok, but there was so much churn of package versions until I got gegl to build that I'm not going to be definite until I've made the second build. Sadly, I cannot build nufraw with gcc-9.1, so I may have to move away from it. 3. libreoffice-6.2.3.2 I hit a build failure in the version I had intended to use, the previous version, and this latest version. Eventually I realised it was being caused by icu4c-64 which exposed a bug in xmlsec1 which is pulled in by LO. And I'm told that with gcc-9.1 the problem is no longer present, although my later system using gcc-9.1 also had the problem. So, I've added xmlsec1 and continued with the latest version of LO. 4. gstreamer-1.16.0 and its plugins - this got released after I had reviewed the previous versions re picking up my CFLAGS, and I particularly wanted to look at libavutil : the new version is much nicer, using system ffmpeg. 5. I updated the running kernel to 5.0.16, with the latest intel microcode and the default mitigations. This will slow things down. 6. firefox : it was clear that 67 would be released before I was to publish this, so I've updated to 67.0 (because firefox is one of the main things I use, and almost every release fixes vulnerabilities). 7. I finally managed to build texlive-20190410 (by disabling dvisvgm) Because there will end up being many similar variations for what, if anything, I had to do to see that my CFLAGS were being used, I'm creating notes, so [1] means "See Note 1". Brief guide to main notes: [0] No C/C++ compilation. [1] Uses my CFLAGS. [2] If I run make V=1 I can see it uses my CFLAGS. For the rest, check tuning-notes-1 Summary of the packages I build (and the order in which I build them) --------------------------------------------------------------------- Stage One: The tools. 1.001 binutils-2.32 pass-1 [1] 1.002 gcc-8.3.0 pass 1 [1] 1.003 linux-5.0.9 headers [0] 1.004 glibc-2.29 [1] 1.005 gcc-8.3.0 libstdcpp : as above 1.006 binutils-2.32 pass 2 : as above 1.007 gcc-8.3.0 pass 2 : as above 1.008 tcl8.6.9 [1] 1.009 expect5.45.4 [1] 1.010 dejagnu-1.6.2 [0] 1.011 m4-1.4.18 [2] 1.012 ncurses-6.1 [1] 1.013 bash-5.0 [1] 1.014 bison-3.3.2 [2] 1.015 bzip2-1.0.6 [3] 1.016 coreutils-8.31 [2] 1.017 diffutils-3.7 [2] 1.018 file-5.36 [2] 1.019 findutils-4.6.0 [1] 1.020 gawk-5.0.0 [1] 1.021 gettext-0.19.8.1 [1] 1.022 grep-3.3 [2] 1.023 gzip-1.10 [2] 1.024 make-4.2.1 [1] 1.025 perl-5.28.2 [4] 1.026 Python-3.7.3 [5] 1.027 sed-4.7 [2] 1.028 tar-1.32 [2] 1.029 texinfo-6.6 [1] 1.030 xz-5.2.4 [1] Stage Two: Chroot. 2.001 linux-5.0.9 headers, as above 2.002 man-pages-5.00 [0] 2.003 glibc-2.29 as above 2.004 zlib-1.2.11 [1] 2.005 file-5.36 as above 2.006 readline-8.0i [1] 2.007 m4-1.4.18 as above 2.008 bc-1.1.4 : [1] [6] 2.009 binutils-2.32 as above 2.010 gmp-6.1.2 [1] [7] 2.011 mpfr-4.0.2 [1] 2.012 mpc-1.1.0 [1] 2.013 shadow-4.6 [2] 2.014 gcc-8.3.0 as [1] [53] 2.015 bzip2-1.0.6 as above 2.016 pkg-config-0.29.2 [1] 2.017 ncurses-6.1 as above 2.018 attr-2.4.48 [2] 2.019 acl-2.2.53a [2] 2.020 libcap-2.27 [8] 2.021 sed-4.7 as above 2.022 psmisc-23.2 [1] 2.023 iana-etc-2.30 [0] 2.024 bison-3.3.2 as above 2.025 flex-2.6.4 [1] 2.026 bison-3.3.2 tests, as above 2.027 grep-3.3 as above 2.028 bash-5.0 as above 2.029 libtool-2.4.6 [2] 2.030 gdbm-1.18.1 [1] 2.031 gperf-3.1 [1] 2.032 expat-2.2.6 1] 2.033 inetutils-1.9.4 [2] 2.034 perl-5.28.2 as above 2.035 XML-Parser-2.44 [9] 2.036 intltool-0.51.0 [0] 2.037 autoconf-2.69 [0] 2.038 automake-1.16.1 [0] 2.039 xz-5.2.4 as above 2.040 kmod-26 [1] 2.041 gettext-0.19.8.1 [1] 2.042 elfutils-0.176 [2] 2.043 libffi-3.2.1 [1] 2.044 openssl-1.1.1b [1] 2.045 Python-3.7.3 as above 2.046 ninja-1.9.0 [10] 2.047 meson-0.50.1 [11] 2.048 coreutils-8.31 as above 2.049 check-0.12.0 [1] 2.050 acl-2.2.53 (tests) as above 2.051 diffutils-3.7 as above 2.052 gawk-5.0.0 as above 2.053 findutils-4.6.0 as above 2.054 groff-1.22.4 [1] 2.055 grub-2.02 [12] * 2.056 less-530 [1] 2.057 gzip2-1.10 as above 2.058 iproute2-5.0.0 [2] 2.059 kbd-2.0.4 [1] 2.060 libpipeline-1.5.1 [1] 2.061 make-4.2.1 as above 2.062 patch-2.7.6 as above 2.063 man-db-2.8.5 : [1] 2.064 tar-1.32 : as above 2.065 texinfo-6.6 : as above 2.066 vim-8.1 [1] 2.067 procps-ng-3.3.15 [2] 2.068 util-linux-2.33.2 [1] 2.069 e2fsprogs-1.45.0 [2] 2.070 sysklogd-1.5.1 [13] 2.071 sysvinit-2.94 [1] 2.072 eudev-3.2.7 [2] Stage Three: still in chroot, things I build before I boot. 3.001 for which, I use a script [0] 3.002 sqlite-3.28.0 [14] This seems to build very slowly with -O2, compared to its default build. 3.003 libtasn1-4.13 [2] 3.004 p11-kit-0.23.15 [2] 3.005 make-ca [0] 3.006 libunistring [1] 3.007 libidn2-2.1.1 [1] 3.008 wget-1.20.3 [1] 3.009 ca-certs [0] 3.010 Python-2.7.16 [15] 3.011 six-1.12.0 [11] 3.012 Python-3.7.3 as above. 3.013 whois-5.4.2 [1] 3.014 traceroute-2.1.0 [16] 3.015 iptables-1.8.2 [1] 3.016 pcre-8.43 [1] 3.017 pcre2-10.33 [1] 3.018 strace-4.26 [1] 3.019 libisofs-1.5.0 [1] 3.020 libburn-1.5.0 [1] 3.021 libisoburn-1.5.0 [1] 3.022 curl-7.64.1 [1] 3.023 git-2.21.0 [2] 3.024 db-5.3.28 [17] 3.025 recode-3.6 [1] build as in fedora 3.026 fortune-mod-mod-1.99.1 [18] build as fedora 3.027 pciutils-3.6.2 [19] 3.028 chrony-3.4 [1] 3.029 icu4c-64_2 [1] 3.030 postfix-3.4.5 [20] 3.031 popt-1.16 [1] 3.032 rsync-3.1.3 [1] 3.033 unzip60 [21] 3.034 fcron-3.2.1 [22]] 3.035 logrotate-3.15.0 [2] 3.036 gpm-1.20.7 [1] 3.037 nasm-2.14.02 [17] 3.038 yasm-1.3.0 [1] 3.039 libpng-1.6.37 [1] 3.040 libarchive-3.3.3 [2] 3.041 libuv-v1.28.0 [2] [23] 3.042 cmake-3.14.2 [1] 3.043 libjpeg-turbo-2.0.2 [24] 3.044 libwebp-1.0.2 [1] 3.045 tiff-4.0.10 [24] 3.046 links-2.19 [1] (This lets me run links -g before building a desktop, but I have to rebuild it after installing Xorg.) 3.047 smartmontools-7.0 [1] 3.048 openssh-8.0p1 [1] 3.049 libtirpc-1.1.4 [2] 3.050 rpcbind-1.2.5 [1] 3.051 rpcsvc-proto-1.4 [1] 3.052 nfs-utils-2.3.3 [1] 3.053 lsof_4.91 [25] 3.054 cpio-2.12 [2] 3.055 gptfdisk-1.0.4 [1] 3.056 alsa-lib-1.1.8 [2] 3.057 alsa-utils-1.1.8 [1] 3.058 haveged-1.9.2 [1] 3.059 unbound-1.9.1 [1] This seems to be an example where the default unoptimized build takes a much longer time. 3.060 ethtool-5.0 [1] Stage Four: Boot it, and check basic functionality At this point I rebuild binutils-pass-1 (*without* CFLAGS) to get a reliable measurement I can use when editing BLFS. Stage Five: docbook etc. 5.001 lm_sensors-3.4.0 [1] iI used to build lm_sensors in chroot, but from time to time a significant number of builds in chroot failed and the Makefile told me to install bison. Not understood, building after booting has always worked so far, so in the end I've moved it to here. 5.002 sgml-common-0.6.3 [0] 5.003 OpenSP [1] 5.004 openjade [1] 5.005 docbk31 [0] 5.006 docbook-4.5 [0] 5.007 docbook-dsssl-1.79 [0] 5.008 SGMLSpm-1.1 [9] 5.009 docbook-utils-0.6.14 [0] 5.010 libxml2-2.9.8 [2] 5.011 libxml2-2.9.8 Python2 module [11] 5.012 libxslt [2] 5.013 docbook-xml-4.5 [0] 5.014 docbook-xsl-nons-1.79.2 [0] 5.015 xmlto-0.0.28 [1] Stage Six: Linux-PAM. 6.001 Linux-PAM [1] 6.002 shadow as above Stage Seven: Xorg. 7.001 freetype-2.10.0 [1] 7.002 fontconfig [2] 7.003 XML-Simple-2.25 [9] 7.004 util-macros-1.19.2 [0] 7.005 xorgproto [0] 7.006 libXau-1.0.9 [2] 7.007 libXdmcp-1.1.3 [2] 7.008 xcb-proto-1.13 [0] [11] 7.009 libxcb-1.13.1 [1] 7.010 xtrans-1.4.0 [0] 7.011 libX11-1.6.7 [2] 7.012 libXext-1.3.4 [2] 7.013 libFS-1.0.8 [2] 7.014 libICE-1.0.9 [2] 7.015 libSM-1.2.3 [2] 7.016 libXScrnSaver-1.2.3 [2] 7.017 libXt-1.1.5 [2] 7.018 libXmu-1.1.3 [2] 7.019 libXpm-3.5.12 [2] 7.020 libXaw-1.0.13 [2] 7.021 libXfixes-5.0.3 [2] 7.022 libXcomposite-0.4.5 [2] 7.023 libXrender-0.9.10 [2] 7.024 libXcursor-1.2.0 [2] 7.025 libXdamage-1.1.5 [2] 7.026 libfontenc-1.1.4 [2] 7.027 libXfont2-2.0.3 [2] 7.028 libXft-2.3.3 [2] 7.029 libXi-1.7.9 [2] 7.030 libXinerama-1.1.4 [2] 7.031 libXrandr-1.5.2 [2] 7.032 libXres-1.2.0 [2] 7.033 libXtst-1.2.3 [2] 7.034 libXv-1.0.11 [2] 7.035 libXvMC-1.0.11 [2] 7.036 libXxf86dga-1.1.5 [2] 7.037 libXxf86vm-1.1.4 [2] 7.038 libdmx-1.1.4 [1] 7.039 libpciaccess-0.14 [1] 7.040 libxkbfile-1.1.0 [2] 7.041 libxshmfence-1.3 [2] 7.042 xcb-util-0.4.0 [2] 7.043 pixman-0.38.4 [26] 7.044 libdrm-2.4.90 [26] 7.045 xcb-util-keysyms-0.4.0 [2] 7.046 docutils-0.14 [11] 7.047 MarkupSafe-1.1.1 [11] 7.048 Sphinx-1.8.4 [11] 7.049 recommonmark-0.5.0 [11] 7.050 llvm-8.0.0 [24] 7.051 libvdpau-1.2 [1] 7.052 wayland-1.17.0 [1] 7.053 Mako [11] 7.054 wayland-protocols-1.17 [0] 7.055 libva-2.4.0 [1] 7.056 mesa-19.0.2 [26] 7.057 libva (bis) as above I'm not convinced that this needs to be built twice, but that is my reading of the book and it is a trivial build. 7.058 glu-9.0.0 [2] 7.059 xbitmaps-1.1.2 [0] 7.060 iceauth-1.0.8 [2] 7.061 mkfontdir-1.0.7 [0] 7.062 mkfontscale-1.2.1 [2] 7.063 rgb-1.0.4 [2] 7.064 setxkbmap-1.3.1 [2] 7.065 xauth-1.0.10 [2] 7.066 xcursorgen-1.0.7 [2] 7.067 xdpyinfo-1.3.2 [2] 7.068 xdriinfo-1.0.6 [2] 7.069 xev-1.2.3 [1] 7.070 xgamma-1.0.6 [2] 7.071 xhost-1.0.8 [2] 7.072 xkbcomp-1.4.2 [2] 7.073 xmodmap-1.0.10 [2] 7.074 xprop-1.2.4 [2] 7.075 xrandr-1.5.0 [2] 7.076 xrdb-1.2.0 [2] 7.077 xrefresh-1.0.6 [2] 7.078 xset-1.2.4 [2] 7.079 xsetroot-1.1.2 [2] 7.080 xwd-1.0.7 [2] 7.081 xcursor-themes-1.0.6 [0] 7.082 xkeyboard-config-2.26 [0] 7.083 libepoxy-1.5.3 [26] 7.084 xorg-server-1.20.4 [2] 7.085 mtdev-1.1.5 [2] 7.086 libevdev-1.6.0 [2] 7.087 libinput-1.13.1 [26] 7.088 xf86-input-libinput-0.28.2 [2] 7.089 xf86-video-intel-20190208 [2] NB the amdgpu-19.0.1, nouveau-1.0.16 and ati-19.0.1 drivers also are Note [2] 7.090 libva-intel-driver-2.3.0 [2] 7.091 xcalc-1.0.4.1 [2] 7.092 xclock-1.0.8 [2] 7.093 xinit-1.4.1 [2] 7.094 rxvt-unicode-9.22 [1] [17] 7.095 A selection of TTF and OTF fonts [0] 7.096 fluxbox-1.3.7 [1] 7.097 tcl8.6.9 as above 7.098 tk8.6.9 [1] 7.099 pm-utils-1.4.1 [1] 7.100 sudo-1.8.27 [1] 7.101 xbindkeys-1.8.6 [1] Stage Eight: glib etc, icewm, firefox. 8.001 iso-codes-4.2 [0] 8.002 dbus-1.12.12 [1] 8.003 icon-naming-utils-0.8.90 [0] 8.004 startup-notification-0.12 [1] 8.005 glib-2.60.1 [26] 8.006 cairo-1.16.0 [1] 8.007 gobject-introspection-1.60.1 [1] 8.008 dbus-glib-0.110 [1] 8.009 hicolor-icon-theme-0.17 [0] 8.010 desktop-file-utils-0.23 [2] 8.011 libgudev-232 [1] 8.012 graphite2-1.3.13 [24] 8.013 harfbuzz-2.4.0 [1] 8.014 freetype as above 8.015 fribidi-1.0.5 [26] 8.016 pango-1.42.4 [26] 8.017 atk-2.32.0 [26] 8.018 shared-mime-info-1.10 [2] 8.019 gdk-pixbuf-2.38.1 [26] 8.020 zip30 [21] 8.021 nspr-4.21 [1] 8.022 nss-3.43 [1] 8.023 lcms2-2.9 [1] 8.024 libusb-1.0.22 [2] 8.025 usbutils-010 [1] 8.026 vala-0.44.3 [1] 8.027 libgusb-0.3.0 [26] 8.028 autoconf-2.13 [0] 8.029 mozjs-52.2.1gnome1 [1] 8.030 colord-1.4.4 [26] 8.031 libpaper [1] 8.032 nettle-3.4.1 [1] 8.033 gnutls-3.6.7.1 [1] 8.034 (reinstall ca-certs for nss and gnutls) 8.035 cups-2.2.11 [1] 8.036 gtk+-2.24.32 [1] 8.037 at-spi2-core-2.32.1 [26] 8.038 at-spi2-atk-2.32.0 [26] 8.039 six-1.12.0 [11] 8.040 libxkbcommon-0.8.4 [1] 8.041 gtk+-3.24.8 [1] 8.042 net-tools-CVS_20101030 [1] 8.043 xsnow-1.42 [27] NB this does not get on with modern DEs, it paints behind their backgrounds 8.044 icewm-1.5.4 [24] 8.045 libnotify-0.7.8 [26] [52] 8.046 pnmixer-v0.7.2 [24] 8.047 libglade-2.6.4 [1] 8.048 xscreensaver-5.42 [1] 8.049 libogg-1.3.3 [1] 8.050 libvorbis [17] [28] 8.051 libtheora-1.1.1 [1] 8.052 flac-1.3.2 [1] 8.053 libsndfile-1.0.28 [2] 8.054 speex-1.2.0 [2] 8.055 speexdsp-1.2rc3 [1] 8.056 pulseaudio-12.2 [1] 8.057 libao-1.2.0 [1] 8.058 vorbis-tools [1] 8.059 libevent-2.1.8 [2] 8.060 libvpx-1.8.0 [2] 8.061 libssh2 [1] 8.062 rustc-1.32.0 with its test [29] [30] 8.063 libcroco-0.6.13 [1] 8.064 librsvg-2.44.13 [29] [31] 8.065 cbindgen-0.8.3 [29] [32] 8.066 c-ares-1.15.0 [1] see errata-1 8.067 node-v10.15.3 [1] 8.068 firefox-67.0 [29] [33] I believe thunderbird and seamonkey can be treated similarly Stage Nine: Most of the photo stuff, and things for LibreOffice. 9.001 Image-ExifTool-11.11 [9] 9.002 exiv2-0.27.1 [24] 9.003 jhead-3.00 [34] 9.004 openjpeg2-2.3.1 [24] 9.005 poppler-0.75.0 [24] [35] 9.006 poppler-data [0] 9.007 babl-0.1.62 [1] 9.008 json-glib-1.4.4 [26] 9.009 libexif-0.6.21 [1] 9.010 pycairo-1.18.1 [11] 9.011 pygobject-2.28.7 [11] 9.012 pygtk [1] 9.013 pygobject-3.32.1 [11] 9.014 gexiv2-0.12.0 [26] 9.015 gegl-0.4.14 [1] 9.016 fftw3-3.3.8 [17] (this is built here because g'mic used to be built here) 9.017 gsettings-desktop-schemas-3.32.0 [26] [36] 9.018 glib-networking-2.60.1 [26] 9.019 libidn-1.35 [1] 9.020 qpdf-8.4.0 [1] 9.021 ghostscript-9.27 [1] 9.022 json-c-0.13.1 [2] 9.023 libmypaint-1.3.0 [1] 9.024 mypaint-brushes-1.3.0 [0] 9.025 libcdio-2.1.0 [1] 9.026 libcddb-1.3.2 [1] 9.027 libcdio-paranoia-10.2+2.0.0 [1] 9.028 libpsl [1] 9.029 libsoup [26] 9.030 libsecret-0.18.8 [1] 9.031 gvfs-1.40.1 [26] 9.032 gimp-2.10.10 [1] 9.033 gtkimageview-1.6.4 [1] 9.034 nufraw-0.42 [2] I've patched this to work with current exiv2, and it works with gcc-8.3.0 But The core C++ code no longer builds with gcc-9.1 so I might have to go to a different raw image plugin. 9.035 freeglut-3.0.0 [24] 9.036 mupdf-1.14.0 [37] 9.037 cups-filters-1.22.5 [1] 9.038 ghostscript-fonts-std-8.11 [0] 9.039 LibRaw-0.19.2 [1] 9.040 ImageMagick-7.0.8-27 [1] [9] 9.041 gutenprint-5.2.14 [1] [38] 9.042 paps-0.6.8 [1] 9.043 epdfview-0.1.8 [1] 9.044 itstool-2.0.6 [0] 9.045 gucharmap-11.0.3 [2] 9.046 galculator-2.1.4 [1] 9.047 xdg-utils-1.1.3 [0] 9.048 Module-Build-0.4224 [9] 9.049 Sub-Identify-0.14 [9] 9.050 SUPER-1.20141117 [9] 9.051 Test-Warnings-0.026 [9] 9.052 Test-MockModule-v0.170.0 [9] 9.053 Archive-Zip-1.64 [9] 9.054 boost_1_70_0 [39] 9.055 adwaita-icon-theme-3.32.0 [0] 9.056 gnome-themes-extra-3.28 [2] 9.057 neon-0.30.2 [1] 9.058 raptor2-2.0.15 [1] 9.059 rasqal-0.9.33 [1] 9.060 redland-1.0.17 [1] 9.061 opus-1.3.1 [1] 9.062 gstreamer-1.16.0 [26] 9.063 gst-plugins-base-1.16.0 [26] 9.064 glm-0.9.9.5 [0] 9.065 libgpg-error-1.36 [1] 9.066 libassuam-2.5.3 [1] 9.067 gpgme-1.13.0 [1] 9.067 xmlsec1-1.2.28 [2] For me, this newer version than what libreoffice downloads is needed to fix a C++ issue triggered by icu_64. I am told other people do not need to use this newer version. Stage Ten: Postgresql and libreoffice. I barely use postgresql these days, but I might get back to it one day. Libreoffice is a major tool for me (writer, and calc) A.001 postgresql-11.2 [1] For these tests I'm doing a full install instead of just the client, and running the tests in case any of the changes I might try break it. A.002 libreoffice-6.2.3.2 [1] Stage Eleven: Most of the remaining AV packages. B.001 a52dec-0.7.4 [40] B.002 lame-3.100 [1] B.003 xvidcore-1.3.5 [1] B.004 libmad-0.15.1b [1] [41] B.005 libdvdread-6.0.1 [2] B.006 libdvdnav-6.0.0 [2] B.007 libdvdcss-1.4.2 [2] B.008 libid3tag-0.15.1b [1] [41] B.009 libsamplerate-0.1.9 [2] [42] B.010 SDL2-2.0.9 [2] [42] B.011 faad2-2.8.8 [1] B.012 x264-snapshot-20190209-stable [1] B.013 x265_3.0 [24] B.014 gst-plugins-good-1.16.0 [26] B.015 gst-plugins-bad-1.16.0 [26] B.016 gst-plugins-ugly-1.16.0 [26] B.017 gstreamer-vaapi-1.16.0 [26] B.018 cdparanoia-III-10.2 [1] B.019 rtmpdump-2.4_p20161210 [43] B.020 ffmpeg-4.1.3 [2] [34] B.021 gst-libav-1.16.0 [26] B.022 mpg123-1.25.10 [1] B.023 audacious-3.10.1 [44] B.024 audacious-plugins-3.10.1 [44] B.025 gnome-icon-theme-3.12.0 [0] B.026 libvdpau-va-gl-0.4.0 [24] B.027 xine-lib-1.2.9 [2] [17] [45] B.028 xine-ui-0.99.10 [2] [42] Exceptionally, this *builds* faster without any CFLAGS, because it does not use any -O setting. B.029 cdrdao-1.2.4 [1] B.030 HTTP-Date-6.0.2 [9] B.031 File-Listing-6.04 [9] B.032 Encode-Locale-1.05 [9] B.033 IO-HTML-1.001 [9] B.034 Test-Needs-0.002005 [9] B.035 URI-1.76 [9] B.036 LWP-MediaTypes-6.02 [9] B.037 Try-Tiny-0.30 [9] B.038 HTTP-Message-6.18 [9] B.039 HTTP-Cookies-6.04 [9] B.040 HTTP-Daemon-6.01 [9] B.041 HTTP-Negotiate-6.01 [9] B.042 HTML-Tagset-3.20 [9] B.043 HTML-Parser-3.72 [9] B.044 Net-HTTP-6.18 [9] B.045 WWW-RobotRules-6.02 [9] B.046 Test-Fatal-0.014 [9] B.047 Test-RequiresInternet-0.05 [9] B.048 libwww-perl-6.36 [9] B.049 XML-NamespaceSupport-1.12 [9] B.050 XML-SAX-Base-1.09 [9] B.051 XML-LibXML-2.0132 [9] B.052 Mojolicious-8.05 [9] B.053 Net-SSLeay-1.86_06 [9] B.054 IO-Socket-SSL-2.066 [9] B.055 LWP-Protocol-https-6.07 [9] B.056 flvstreamer-2.1c1 [46] - see errata-1 B.057 MediaInfo_CLI_18.12_GNU_FromSource [1] B.058 libmpeg2-0.5.1 [17] B.059 transcode-1.1.7 [1] B.060 lsdvd-0.17 [1] B.061 sox-14.4.2 [47] [54] After later issues, I'm now using an updated patch from debian to fix various vulnerabilities in sox (and patch is in lfs patches) B.062 youtube-dl-2019.02.08 [0] NB this version is broken with current youtube, but the download links still point to this one. After installing, as root run 'youtube_dl -U' to update it. Stage Twelve: Qt5, the things that use it, and inkscape. C.001 xcb-util-image-0.4.0 [2] [42] C.002 xcb-util-wm-0.4.1 [2] [42] C.003 qt-everywhere-src-5.12.5 [48] C.004 qtwebengine-everywhere-src-5.12.3 [48] [49] C.005 extra-cmake-modules-5.49.0 [0] C.006 falkon-3.0.1 [24] [48] C.007 vlc-3.0.6 [1] C.008 gmic_2.4.5 [48] NB I only build gmic-qt C.009 evince-3.30.2 [1] C.010 lxappearance-0.6.3 [2] [42] C.011 libxfce4util-4.12.1 [2] [42] C.012 xfconf-4.12.1 [2] [42] C.013 libxfce4ui-4.12.1 [1] C.014 exo-0.12.4 [2] [47] C.015 parole-1.0.2 [2] [42] C.016 xfburn-0.5.5 [1] C.017 aspell-0.60.6.1 [1] C.018 aspell6-en-7.1-0 [0] C.019 gsl-2.5 [1] C.020 libatomic_ops-7.6.10 [1] C.021 gc-8.0.4 [1] C.022 ImageMagick-6.9.10-27 (libs only) [1] C.023 libsigc++-2.10.1 [2] C.024 glibmm-2.60.0 [1] C.025 atkmm-2.28.0 [2] C.026 cairomm-1.12.2 [1] C.027 pangomm-2.42.0 [2] C.028 gtkmm2-2.24.5 [1] C.029 potrace-1.15 [1] C.030 lxml-4.3.3 [11] C.031 scour-0.37 (for python2) [11] C.032 inkscape-0.92.4 [24] [55] Stage Thirteen : most of texlive I did not bother to build biber and its stream of perl module dependencies, because I did not think it would add anything to my results, all (including biber itself) are covered by [9] D.001 ruby-2.6.3 [2] [17] D.oo2 texlive-20190410 [1] D.003 glew-2.1.0 [50] D.004 libsigsegv-2.12 [1] D.005 asymptote-2.49 [51] D.006 clisp [1] D.007 xindy [1] E&OE And now, the big question: what have I gained by specifying these flags ? 1. Space - the builds are smaller, by about 2.3 GB This may not seem a big deal in these days of large disks, but for me it helps to fit all my backups into the available space, and for a system which I intend to keep in use for an extended period it means less chance of running out of space. 2. Is it faster ? For most packages the build is faster, Mostly the speed increase is not enormous, and I put it down to not having to write out redundant debugging information. In a few cases, e.g. libsamplerate, my optimized version runs much faster. 3. I can have reasonable confidence that when I try adding other flags, they will get picked up. But see in particular boost and inkscape for exceptions related to -D flags. 4. It is possible that passing my own CFLAGS to Qt5 is not beneficial. Certainly, changing from -O2 to -O2 -O2 -march=native (sic) if anything slows it down. If I get as far as testing with higher optimization, that may change. Without my own CFLAGS, building the main part of qt (without webengine) is significantly faster, but both packages which use qmake (qtwebengine, falkon) take longer to build. 5. For rustc, passing -march=native appears to slow the builds down, and running some brief tests with rsvg-convert suggests that the execution time is also worsened. But build times for rustc and packages that use it are all over the shop with very high variations. Later runtime tests with some example rust programs convinced me that there is no practical runtime difference for any reasonably-sized rust program's execution time, or for the execution times spent in the standard library, when using optimize levels of 2 or 3, and/or tuning for the native cpu. Revised 2019-07-23.