mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
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
This commit is contained in:
parent
9ade9945a0
commit
7b32a8f61f
@ -1,3 +1,8 @@
|
||||
2017-01-19 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/78478
|
||||
* config/ax_check_define.m4: New file.
|
||||
|
||||
2017-01-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR other/79046
|
||||
|
92
config/ax_check_define.m4
Normal file
92
config/ax_check_define.m4
Normal file
@ -0,0 +1,92 @@
|
||||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_check_define.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AC_CHECK_DEFINE([symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
|
||||
# AX_CHECK_DEFINE([includes],[symbol], [ACTION-IF-FOUND], [ACTION-IF-NOT])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Complements AC_CHECK_FUNC but it does not check for a function but for a
|
||||
# define to exist. Consider a usage like:
|
||||
#
|
||||
# AC_CHECK_DEFINE(__STRICT_ANSI__, CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500")
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation; either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 8
|
||||
|
||||
AU_ALIAS([AC_CHECK_DEFINED], [AC_CHECK_DEFINE])
|
||||
AC_DEFUN([AC_CHECK_DEFINE],[
|
||||
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$1])dnl
|
||||
AC_CACHE_CHECK([for $1 defined], ac_var,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
#ifdef $1
|
||||
int ok;
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
|
||||
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$2], [$3])dnl
|
||||
AS_VAR_POPDEF([ac_var])dnl
|
||||
])
|
||||
|
||||
AU_ALIAS([AX_CHECK_DEFINED], [AX_CHECK_DEFINE])
|
||||
AC_DEFUN([AX_CHECK_DEFINE],[
|
||||
AS_VAR_PUSHDEF([ac_var],[ac_cv_defined_$2_$1])dnl
|
||||
AC_CACHE_CHECK([for $2 defined in $1], ac_var,
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <$1>]], [[
|
||||
#ifdef $2
|
||||
int ok;
|
||||
#else
|
||||
choke me
|
||||
#endif
|
||||
]])],[AS_VAR_SET(ac_var, yes)],[AS_VAR_SET(ac_var, no)]))
|
||||
AS_IF([test AS_VAR_GET(ac_var) != "no"], [$3], [$4])dnl
|
||||
AS_VAR_POPDEF([ac_var])dnl
|
||||
])
|
||||
|
||||
AC_DEFUN([AX_CHECK_FUNC],
|
||||
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])dnl
|
||||
AC_CACHE_CHECK([for $2], ac_var,
|
||||
dnl AC_LANG_FUNC_LINK_TRY
|
||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([$1
|
||||
#undef $2
|
||||
char $2 ();],[
|
||||
char (*f) () = $2;
|
||||
return f != $2; ])],
|
||||
[AS_VAR_SET(ac_var, yes)],
|
||||
[AS_VAR_SET(ac_var, no)])])
|
||||
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
|
||||
AS_VAR_POPDEF([ac_var])dnl
|
||||
])# AC_CHECK_FUNC
|
@ -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
|
||||
|
@ -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], [
|
||||
|
37
libgfortran/configure
vendored
37
libgfortran/configure
vendored
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -40,7 +40,11 @@ fi
|
||||
# the x86 denormal exception.
|
||||
case "${host_cpu}" in
|
||||
i?86 | x86_64)
|
||||
if test "x${have_soft_float}" = "xyes"; then
|
||||
fpu_host='fpu-generic'
|
||||
else
|
||||
fpu_host='fpu-387'
|
||||
fi
|
||||
ieee_support='yes'
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user