The cross-build system wants to append cflags required by the build to the
'optimize' variable, but doesn't touch the variable when the user overrides it.
Since the ebuild passes '-Doptimize="${CFLAGS}"', we are responsible for
passing the correct flags, so append '-fwrapv -fno-strict-aliasing' to cflags
when we are cross-compiling.
Bug: https://bugs.gentoo.org/811237
Reported-by: Github User DRKV333
Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
Closes: https://github.com/gentoo/gentoo/pull/22167
Signed-off-by: Sam James <sam@gentoo.org>