Because math.h defines some inline functions and because these functions are not static it is impossible to safely
use math.h in a binary that uses a mixture of normal and /arch:AVX compiled translation units.
If functions like floorf are not inlined then multiple copies of the function will be compiled and the linker will
choose one. If the linker chooses the one that was compiled by a /arch:AVX translation unit then the binary
is likely to crash on non-AVX capable computers, even if calls to the /arch:AVX functions are carefully gated
behind AVX checks. That is because the AVX and non-AVX code will share a version of floorf.
The alternate consequence is more insidious. If the non-AVX version of floorf gets chosen then performance will
suffer on AVX machines due to the mixing of AVX and non-AVX FP instructions. This degradation will likely not be
All of this complication and misery can be avoided by following gcc's lead and marking inline functions in math.h
(and other system header files) as static. Chrome has been forced to do this (using the preprocessor to do the
dirty work - see https://skia-review.googlesource.com/c/5089/) in order to continue safely using /arch:AVX.