build failure due to distribution implicit compiler files: _FORTIFY_SOURCE on Gentoo
Gentoo's compiler patches include -D_FORTIFY_SOURCE=2 if -O2 or higher are used.
This causes lots of error spew that _FORTIFY_SOURCE is defined twice when compiling on Gentoo:
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
To resolve this, we should explicitly undefine _FORTIFY_SOURCE before trying to define it again.
Gentoo: _FORTIFY_SOURCE fix.
GCC under Gentoo has a patch that has a built-in define for
_FORTIFY_SOURCE if -O2 or higher are used. This causes warnings about
_FORTIFY_SOURCE redefined for every single object compiled.
Work around the issue by explicitly undefining _FORTIFY_SOURCE before we
define it again.