diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2017-01-19 22:00:53 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2017-01-19 22:00:53 +0100 |
commit | 7b32a8f61f4b3a34cacbd029e85220787eada240 (patch) | |
tree | cacf5acabfee467ac9b6420c71be5a7c048e6fea /libgfortran | |
parent | 9ade9945a07c47abf2d1d5ad3a5de504e9f37b73 (diff) | |
download | gcc-7b32a8f61f4b3a34cacbd029e85220787eada240.zip gcc-7b32a8f61f4b3a34cacbd029e85220787eada240.tar.gz gcc-7b32a8f61f4b3a34cacbd029e85220787eada240.tar.bz2 |
re PR target/78478 (Compile Error for i386-rtems)
PR target/78478
* config/ax_check_define.m4: New file.
libgfortran/ChangeLog:
PR target/78478
* acinclude.m4: Include ../config/ax_check_define.m4
* configure.ac: Check if _SOFT_FLOAT is defined.
* configure.host (i?86 | x86_64): Use fpu-generic when
have_soft_float is set.
* configure: Regenerate.
From-SVN: r244651
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 9 | ||||
-rw-r--r-- | libgfortran/acinclude.m4 | 1 | ||||
-rwxr-xr-x | libgfortran/configure | 37 | ||||
-rw-r--r-- | libgfortran/configure.ac | 3 | ||||
-rw-r--r-- | libgfortran/configure.host | 6 |
5 files changed, 55 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 6d252be..ad4f65b 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,12 @@ +2017-01-19 Uros Bizjak <ubizjak@gmail.com> + + PR target/78478 + * acinclude.m4: Include ../config/ax_check_define.m4 + * configure.ac: Check if _SOFT_FLOAT is defined. + * configure.host (i?86 | x86_64): Use fpu-generic when + have_soft_float is set. + * configure: Regenerate. + 2017-01-19 Jakub Jelinek <jakub@redhat.com> PR target/79127 diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4 index 34e1407..ceb80a1 100644 --- a/libgfortran/acinclude.m4 +++ b/libgfortran/acinclude.m4 @@ -1,6 +1,7 @@ m4_include(../config/acx.m4) m4_include(../config/no-executables.m4) m4_include(../config/math.m4) +m4_include(../config/ax_check_define.m4) dnl Check that we have a working GNU Fortran compiler AC_DEFUN([LIBGFOR_WORKING_GFORTRAN], [ diff --git a/libgfortran/configure b/libgfortran/configure index 20b5e68..81238fc 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25822,6 +25822,43 @@ $as_echo "#define HAVE_FP_ENABLE 1" >>confdefs.h fi +# Check if _SOFT_FLOAT is defined + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _SOFT_FLOAT defined" >&5 +$as_echo_n "checking for _SOFT_FLOAT defined... " >&6; } +if test "${ac_cv_defined__SOFT_FLOAT+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + #ifdef _SOFT_FLOAT + int ok; + #else + choke me + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_defined__SOFT_FLOAT=yes +else + ac_cv_defined__SOFT_FLOAT=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_defined__SOFT_FLOAT" >&5 +$as_echo "$ac_cv_defined__SOFT_FLOAT" >&6; } +if test $ac_cv_defined__SOFT_FLOAT != "no"; then : + have_soft_float=yes +fi + # Runs configure.host to set up necessary host-dependent shell variables. # We then display a message about it, and propagate them through the # build chain. diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index 66a8462..37b12d2 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -556,6 +556,9 @@ AC_CHECK_FUNC([fpresetsticky],[have_fpresetsticky=yes AC_DEFINE([HAVE_FPRESETSTI AC_CHECK_FUNC([fp_trap],[have_fp_trap=yes AC_DEFINE([HAVE_FP_TRAP],[1],[fp_trap is present])]) AC_CHECK_FUNC([fp_enable],[have_fp_enable=yes AC_DEFINE([HAVE_FP_ENABLE],[1],[fp_enable is present])]) +# Check if _SOFT_FLOAT is defined +AC_CHECK_DEFINE([_SOFT_FLOAT],[have_soft_float=yes]) + # Runs configure.host to set up necessary host-dependent shell variables. # We then display a message about it, and propagate them through the # build chain. diff --git a/libgfortran/configure.host b/libgfortran/configure.host index 0a12a32..5824f25 100644 --- a/libgfortran/configure.host +++ b/libgfortran/configure.host @@ -40,7 +40,11 @@ fi # the x86 denormal exception. case "${host_cpu}" in i?86 | x86_64) - fpu_host='fpu-387' + if test "x${have_soft_float}" = "xyes"; then + fpu_host='fpu-generic' + else + fpu_host='fpu-387' + fi ieee_support='yes' ;; esac |