24 May 2012 04:34
Experiment: using -O3 in the toolchain
Ken Moffat <zarniwhoop <at> ntlworld.com>
2012-05-24 02:34:21 GMT
2012-05-24 02:34:21 GMT
Last month, I was querying the use of -O3 in glibc with x86_64 on lfs-dev : turned out my problems on that one machine are down to buying cheap consumer-grade hardware (it works, mostly) :) But I then got to thinking about using -O3 for the rest of the toolchain. I've now completed test builds (CFLAGS and CXXFLAGS = -O2 everywhere, and with -O3 in chapter 5 pass 2 and chapter 6 binutils, gmp, mpc, mpfr,gcc). Note that some packages, particularly in BLFS, ignore CFLAGS. The toolchain testsuite results are no different (same failures in gcc, and with static libs which I do not install). This is x86_64 on an i3 (hyperthreaded dual processor, the kernel thinks it is 4 processors) with 4GB of RAM. I built these in directories because they aren't intended to be used, and I didn't build the kernel (that would be another 4 or 5 minutes!). Apart from that, I built everything that is currently part of my normal desktop, and using -j3 for builds (but not installs!) except where that gives problems. I try to reserve some cpu so that cron jobs, particularly backups, can run, or so that I can browse or listen to music if I wish to, in both cases without impacting the build time or my listening/browsing experience. It's nice to now have hardware that is capable of building with -O3 on current gcc (my previous single processor machines were too slow and too lacking in RAM), but I don't think I'll bother again. I used my standard scripts, so timing for each package is from configure to the end of the install, to the nearest second. The times for the total build were 6 hours and 6 hours 3 minutes with the -O3 toolchain. The -O3 build used slightly more disk space in(Continue reading)
RSS Feed