# IA64 build is broken in setjmp code:
# https://sourceforge.net/p/gnu-efi/bugs/9/
KEYWORDS="-* ~amd64 ~arm ~arm64 -ia64 ~x86"
-IUSE="abi_x86_32 abi_x86_64"
+IUSE="abi_x86_32 abi_x86_64 -custom-cflags"
DEPEND="sys-apps/pciutils"
RDEPEND=""
src_compile() {
tc-export BUILD_CC AR AS CC LD
- # https://bugs.gentoo.org/607992
- filter-mfpmath sse
+ if use custom-cflags; then
+ # https://bugs.gentoo.org/607992
+ filter-mfpmath sse
+
+ # https://bugs.gentoo.org/619628
+ append-flags $(test-flags-CC -mno-avx)
+ else
+ unset CFLAGS CPPFLAGS LDFLAGS
+ fi
if [[ ${CHOST} == x86_64* ]]; then
use abi_x86_32 && CHOST=i686 ABI=x86 efimake