During the upgrade from 1.0.182 to 1.0.196 I noticed Clang throwing the following warning: > clang: warning: argument '-Ofast' is deprecated; use '-O3 -ffast-math' for the same behavior, or '-O3' to enable only conforming optimizations [-Wdeprecated-ofast] Turns out CMakeLists.txt sets -Ofast [1] and -flto [2] overriding the user's *FLAGS. [1] https://github.com/intel/metrics-library/blob/metrics-library-1.0.196/CMakeLists.txt#L625 [2] https://github.com/intel/metrics-library/blob/metrics-library-1.0.196/CMakeLists.txt#L647
Indeed, I have noticed this, too. I altered the .ebuild to: src_prepare() { sed -e '/-flto/d' -i CMakeLists.txt sed -e '/-fPIE/d' -i CMakeLists.txt sed -e '/-Ofast/d' -i CMakeLists.txt sed -e '/-Werror/d' -i CMakeLists.txt || die cmake_src_prepare } On a LLVM/Clang+libc++ system LLD was throwing out recompile with -fPIC errors so in addition to the -flto and -Ofast so I also removed -fPIE as well.