[Request for Help] Reducing gcc 4.9 compilation warnings

Craig Rodrigues rodrigc at FreeBSD.org
Sat Apr 18 18:12:34 UTC 2015


After the latest commits by members of freebsd-toolchain@ ,
I have managed to compile latest CURRENT world and GENERIC
kernel on amd64 with an gcc 4.9 external toolchain by doing:

   pkg install devel/amd64-xtoolchain-gcc
   cd /usr/src
   sed -i "" -e 's/boot2//' sys/boot/i386/Makefile
   make buildworld CROSS_TOOLCHAIN=amd64-gcc NO_WERROR=yes WERROR=
   make buildkernel CROSS_TOOLCHAIN=amd64-gcc NO_WERROR=yes WERROR=

It was necessary to skip boot2 from building because of errors
reported here:

The boot2 compilation errors still need to be worked on.

However, most other things compile with warnings.  If folks are
interested in looking at the warnings, you can see them here:


Please look at these warnings, and if you see places to
patch the code to eliminate the warnings, please submit patches
and commit them if you can.

clang is still going to be the default compiler in the base system,
but it is nice to have FreeBSD compilable by multiple compilers.

More information about the freebsd-testing mailing list