compiler supports ifunc but musl dynamic linker does not. --- ./configure.orig +++ ./configure @@ -1787,7 +1787,8 @@ int main(void) { foo(); return 0; } EOF if compile_prog "-mavx2" "" ; then - if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then + if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1 && + ldd $TMPE >/dev/null 2>&1; then avx2_opt="yes" fi fi