diff options
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 103 |
1 files changed, 101 insertions, 2 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index 81238fc..36e0155 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -606,6 +606,8 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS get_gcc_base_ver +HAVE_AVX128_FALSE +HAVE_AVX128_TRUE IEEE_FLAGS IEEE_SUPPORT IEEE_SUPPORT_FALSE @@ -12421,7 +12423,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12424 "configure" +#line 12426 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12527,7 +12529,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12530 "configure" +#line 12532 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -26363,6 +26365,99 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" +# Check for FMA3 extensions + + ac_save_CFLAGS="$CFLAGS" + CFLAGS="-O2 -mfma -mno-fma4" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + float + flt_mul_add (float a, float b, float c) + { + return __builtin_fmaf (a, b, c); + } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_FMA3 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + + +# Check for FMA4 extensions + + ac_save_CFLAGS="$CFLAGS" + CFLAGS="-O2 -mfma4 -mno-fma" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + float + flt_mul_add (float a, float b, float c) + { + return __builtin_fmaf (a, b, c); + } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_FMA4 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + + +# Check if AVX128 works + + ac_save_CFLAGS="$CFLAGS" + CFLAGS="-O2 -mavx -mprefer-avx128" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + void foo() + { + } +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +$as_echo "#define HAVE_AVX128 1" >>confdefs.h + + if true; then + HAVE_AVX128_TRUE= + HAVE_AVX128_FALSE='#' +else + HAVE_AVX128_TRUE='#' + HAVE_AVX128_FALSE= +fi + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$ac_save_CFLAGS" + + # Determine what GCC version number to use in filesystem paths. get_gcc_base_ver="cat" @@ -26615,6 +26710,10 @@ if test -z "${IEEE_SUPPORT_TRUE}" && test -z "${IEEE_SUPPORT_FALSE}"; then as_fn_error "conditional \"IEEE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_AVX128_TRUE}" && test -z "${HAVE_AVX128_FALSE}"; then + as_fn_error "conditional \"HAVE_AVX128\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 |