]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add -fno-common to all userland/kernel src builds
authorKyle Evans <kevans@FreeBSD.org>
Tue, 7 Apr 2020 17:04:24 +0000 (17:04 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 7 Apr 2020 17:04:24 +0000 (17:04 +0000)
commit8eb1a0ce5654fe5109e2edb0a90ecb09f29c5a28
tree52481501372e0a62fdfff4159be922d2256fa0af
parent723f9041769c9b7310bd16d4a9a2d8e8eeca350f
Add -fno-common to all userland/kernel src builds

-fno-common will become the default in GCC10/LLVM11. Plenty of work has been
put in to make sure our world builds are no -fno-common clean, so let's slap
the build with this until it becomes the compiler default to ensure we don't
regress.

At this time, we will not be enforcing -fno-common on ports builds. I
suspect most ports will be or quickly become -fno-common clean as they're
naturally built against compilers that default to it, so this will hopefully
become a non-issue in due time. The exception to this, which is actually the
status quo, is that kmods built from ports will continue to build with
-fno-common.

As of the time of writing, I intend to also make stable/12 -fno-common
clean. What's been done will be MFC'd to stable/11 if it's easily applicable
and/or not much work to massage it into being functional, but I anticipate
adding -fcommon to stable/11 builds to maintain its ability to be built with
newer compilers for the rest of its lifetime instead of putting in a third
branch's worth of effort.
share/mk/src.sys.mk
sys/conf/kern.pre.mk
sys/conf/kmod.mk