re PR bootstrap/26055 (libgcc-math declaration of __isinf conflicts with system header, fails bootstrap)

2006-02-28  Richard Guenther  <rguenther@suse.de>

	PR bootstrap/26055
	Revert
	* configure.ac: Disable libgcc-math if we cannot mix
	declaration of __isinf and math.h inclusion.
	* configure: Re-generate.

	* i386/Makefile.am: Use -std=c99, do not use -ffinite-math-only,
	do not define __NO_MATH_INLINES.
	* i386/Makefile.in: Re-generate.
	* include/math_private.h (__atanf): Declare.
	(__scalbnf): Likewise.
	(__floorf): Likewise.
	(__isinff): Likewise.
	(__scalbn): Likewise.
	(__floor): Likewise.
	(fabs): Likewise.
	(fabsf): Likewise.
	* flt-32/e_acosf.c: Do not include math.h
	* flt-32/s_isinff.c: Likewise.
	* flt-32/k_tanf.c: Likewise.
	* flt-32/e_sqrtf.c: Likewise.
	* flt-32/e_asinf.c: Likewise.
	* flt-32/k_cosf.c: Likewise.
	* flt-32/k_sinf.c: Likewise.
	* flt-32/s_floorf.c: Likewise.
	* flt-32/s_tanf.c: Likewise.
	* flt-32/s_atanf.c: Likewise.
	* flt-32/s_cosf.c: Likewise.
	* flt-32/e_atan2f.c: Likewise.
	* flt-32/e_powf.c: Likewise.
	* flt-32/s_sinf.c: Likewise.
	* flt-32/e_rem_pio2f.c: Likewise.
	* flt-32/s_scalbnf.c: Likewise.
	* flt-32/e_logf.c: Likewise.
	* flt-32/e_log10f.c: Likewise.
	* flt-32/k_rem_pio2f.c: Likewise.
	* flt-32/e_expf.c: Likewise.  Use __builtin_isless and
	__builtin_isgreater.
	* dbl-64/s_floor.c: Do not include math.h.
	* dbl-64/e_log10.c: Likewise.
	* dbl-64/k_rem_pio2.c: Likewise.
	* dbl-64/s_atan.c: Likewise.
	* dbl-64/s_scalbn.c: Likewise.
	* dbl-64/s_isinf.c: Likewise.
	* dbl-64/s_tan.c: Likewise.
	* dbl-64/e_rem_pio2.c: Likewise.  Avoid uninitialized variable
	warning.
	* dbl-64/mpa.c: Likewise.

From-SVN: r111563
This commit is contained in:
Richard Guenther 2006-02-28 11:29:41 +00:00 committed by Richard Biener
parent 8cd25827df
commit 6ff68ac318
35 changed files with 72 additions and 130 deletions

View File

@ -1,3 +1,54 @@
2006-02-28 Richard Guenther <rguenther@suse.de>
PR bootstrap/26055
Revert
* configure.ac: Disable libgcc-math if we cannot mix
declaration of __isinf and math.h inclusion.
* configure: Re-generate.
* i386/Makefile.am: Use -std=c99, do not use -ffinite-math-only,
do not define __NO_MATH_INLINES.
* i386/Makefile.in: Re-generate.
* include/math_private.h (__atanf): Declare.
(__scalbnf): Likewise.
(__floorf): Likewise.
(__isinff): Likewise.
(__scalbn): Likewise.
(__floor): Likewise.
(fabs): Likewise.
(fabsf): Likewise.
* flt-32/e_acosf.c: Do not include math.h
* flt-32/s_isinff.c: Likewise.
* flt-32/k_tanf.c: Likewise.
* flt-32/e_sqrtf.c: Likewise.
* flt-32/e_asinf.c: Likewise.
* flt-32/k_cosf.c: Likewise.
* flt-32/k_sinf.c: Likewise.
* flt-32/s_floorf.c: Likewise.
* flt-32/s_tanf.c: Likewise.
* flt-32/s_atanf.c: Likewise.
* flt-32/s_cosf.c: Likewise.
* flt-32/e_atan2f.c: Likewise.
* flt-32/e_powf.c: Likewise.
* flt-32/s_sinf.c: Likewise.
* flt-32/e_rem_pio2f.c: Likewise.
* flt-32/s_scalbnf.c: Likewise.
* flt-32/e_logf.c: Likewise.
* flt-32/e_log10f.c: Likewise.
* flt-32/k_rem_pio2f.c: Likewise.
* flt-32/e_expf.c: Likewise. Use __builtin_isless and
__builtin_isgreater.
* dbl-64/s_floor.c: Do not include math.h.
* dbl-64/e_log10.c: Likewise.
* dbl-64/k_rem_pio2.c: Likewise.
* dbl-64/s_atan.c: Likewise.
* dbl-64/s_scalbn.c: Likewise.
* dbl-64/s_isinf.c: Likewise.
* dbl-64/s_tan.c: Likewise.
* dbl-64/e_rem_pio2.c: Likewise. Avoid uninitialized variable
warning.
* dbl-64/mpa.c: Likewise.
2006-02-08 Richard Guenther <rguenther@suse.de>
* dbl-64/mpa.c: Do not include sys/param.h.

70
libgcc-math/configure vendored
View File

@ -7661,73 +7661,6 @@ fi
# Check for target library dependencies
cannot_build=no
echo "$as_me:$LINENO: checking whether math.h conflicts with defining __isinf" >&5
echo $ECHO_N "checking whether math.h conflicts with defining __isinf... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "math.h"
int __isinf (double x)
{
}
int
main ()
{
return __isinf (1.0);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cannot_build=yes
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
# Now check which parts we include in the library.
arch_subdirs=
@ -7745,9 +7678,6 @@ esac
if test "$cannot_build" = "yes"; then
arch_subdirs=
fi
if test "x$arch_subdirs" != x; then

View File

@ -125,25 +125,6 @@ fi
GCC_HEADER_STDINT(gstdint.h)
# Check for target library dependencies
cannot_build=no
AC_MSG_CHECKING([whether math.h conflicts with defining __isinf])
AC_TRY_LINK([
#include "math.h"
int __isinf (double x)
{
}
], [
return __isinf (1.0);
], [
AC_MSG_RESULT([no])
], [
AC_MSG_RESULT([yes])
cannot_build=yes
])
# Now check which parts we include in the library.
arch_subdirs=
@ -161,9 +142,6 @@ esac
AC_SUBST(arch_subdirs)
AC_SUBST(arch_libraries)
AC_SUBST(arch_maps)
if test "$cannot_build" = "yes"; then
arch_subdirs=
fi
AM_CONDITIONAL(BUILD_LIBGCC_MATH, [test "x$arch_subdirs" != x])

View File

@ -47,7 +47,6 @@ static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $";
* shown.
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -20,7 +20,6 @@ static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $
* use __kernel_rem_pio2()
*/
#include "math.h"
#include "math_private.h"
/*
@ -90,7 +89,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
double x,y[];
#endif
{
double z,w,t,r,fn;
double z=z,w,t,r,fn;
double tx[3];
int32_t e0,i,j,nx,n,ix,hx;
uint32_t low;

View File

@ -130,7 +130,6 @@ static char rcsid[] = "$NetBSD: k_rem_pio2.c,v 1.7 1995/05/10 20:46:25 jtc Exp $
* to produce the hexadecimal values shown.
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -132,7 +132,7 @@ static void norm(const mp_no *x, double *y, int p)
#if 0
int k;
#endif
double a,c,u,v,z[5];
double a,c=c,u,v,z[5];
if (p<5) {
if (p==1) c = X[1];
else if (p==2) c = X[1] + R* X[2];

View File

@ -42,7 +42,6 @@
#include "MathLib.h"
#include "uatan.tbl"
#include "atnat.h"
#include "math.h"
void __mpatan(mp_no *,mp_no *,int); /* see definition in mpatan.c */
static double atanMp(double,const int[]);

View File

@ -23,7 +23,6 @@ static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $";
* Inexact flag raised if x not equal to floor(x).
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -13,7 +13,6 @@ static char rcsid[] = "$NetBSD: s_isinf.c,v 1.3 1995/05/11 23:20:14 jtc Exp $";
* no branching!
*/
#include "math.h"
#include "math_private.h"
int

View File

@ -21,7 +21,6 @@ static char rcsid[] = "$NetBSD: s_scalbn.c,v 1.8 1995/05/10 20:48:08 jtc Exp $";
* exponentiation or a multiplication.
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -37,7 +37,6 @@
#include "dla.h"
#include "mpa.h"
#include "MathLib.h"
#include "math.h"
static double tanMp(double);
void __mptan(double, mp_no *, int);

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: e_acosf.c,v 1.5 1995/05/12 04:57:16 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -39,7 +39,6 @@
static char rcsid[] = "$NetBSD: e_asinf.c,v 1.5 1995/05/12 04:57:25 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: e_atan2f.c,v 1.4 1995/05/10 20:44:53 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -52,7 +52,6 @@
#endif
#include <float.h>
#include <ieee754.h>
#include <math.h>
#include <math_private.h>
extern const float __exp_deltatable[178];
@ -67,7 +66,7 @@ __ieee754_expf (float x)
static const float himark = 88.72283935546875;
static const float lomark = -103.972084045410;
/* Check for usual case. */
if (isless (x, himark) && isgreater (x, lomark))
if (__builtin_isless (x, himark) && __builtin_isgreater (x, lomark))
{
static const float THREEp42 = 13194139533312.0;
static const float THREEp22 = 12582912.0;
@ -115,7 +114,7 @@ __ieee754_expf (float x)
return (float) result;
}
/* Exceptional cases: */
else if (isless (x, himark))
else if (__builtin_isless (x, himark))
{
if (__isinff (x))
/* e^-inf == 0, with no error. */

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: e_log10f.c,v 1.5 1995/05/10 20:45:53 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: e_logf.c,v 1.4 1995/05/10 20:45:54 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: e_powf.c,v 1.7 1996/04/08 15:43:44 phil Exp $";
#endif
#include "math.h"
#include "math_private.h"
static const float huge = 1.0e+30, tiny = 1.0e-30;

View File

@ -23,7 +23,6 @@ static char rcsid[] = "$NetBSD: e_rem_pio2f.c,v 1.5 1995/05/10 20:46:03 jtc Exp
* use __kernel_rem_pio2f()
*/
#include "math.h"
#include "math_private.h"
/*

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: e_sqrtf.c,v 1.4 1995/05/10 20:46:19 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: k_cosf.c,v 1.4 1995/05/10 20:46:23 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: k_rem_pio2f.c,v 1.4 1995/05/10 20:46:28 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
/* In the float version, the input parameter x contains 8 bit

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: k_sinf.c,v 1.4 1995/05/10 20:46:33 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: k_tanf.c,v 1.4 1995/05/10 20:46:39 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: s_atanf.c,v 1.4 1995/05/10 20:46:47 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: s_cosf.c,v 1.4 1995/05/10 20:47:03 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -26,7 +26,6 @@ static char rcsid[] = "$NetBSD: s_floorf.c,v 1.4 1995/05/10 20:47:22 jtc Exp $";
* Inexact flag raised if x not equal to floorf(x).
*/
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -12,7 +12,6 @@ static char rcsid[] = "$NetBSD: s_isinff.c,v 1.3 1995/05/11 23:20:21 jtc Exp $";
* no branching!
*/
#include "math.h"
#include "math_private.h"
int

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: s_scalbnf.c,v 1.4 1995/05/10 20:48:10 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: s_sinf.c,v 1.4 1995/05/10 20:48:16 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -17,7 +17,6 @@
static char rcsid[] = "$NetBSD: s_tanf.c,v 1.4 1995/05/10 20:48:20 jtc Exp $";
#endif
#include "math.h"
#include "math_private.h"
#ifdef __STDC__

View File

@ -11,9 +11,9 @@ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
noinst_LTLIBRARIES = libsse2.la
libsse2_la_CFLAGS = -I@srcdir@/../include -I.. -include @srcdir@/sse2.h \
-Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
-fno-math-errno -fno-trapping-math -ffinite-math-only \
-fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
-Wall -std=c99 -O2 -g \
-msse2 -msseregparm -mfpmath=sse -march=pentium3 -mtune=generic \
-fno-math-errno -fno-trapping-math -fno-rounding-math -fno-signaling-nans
libsse2_la_SOURCES = \
@srcdir@/../flt-32/e_acosf.c \

View File

@ -200,9 +200,9 @@ toolexeclibdir = @toolexeclibdir@
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
noinst_LTLIBRARIES = libsse2.la
libsse2_la_CFLAGS = -I@srcdir@/../include -I.. -include @srcdir@/sse2.h \
-Wall -O2 -g -msse2 -msseregparm -mfpmath=sse -march=pentium3 \
-fno-math-errno -fno-trapping-math -ffinite-math-only \
-fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
-Wall -std=c99 -O2 -g \
-msse2 -msseregparm -mfpmath=sse -march=pentium3 -mtune=generic \
-fno-math-errno -fno-trapping-math -fno-rounding-math -fno-signaling-nans
libsse2_la_SOURCES = \
@srcdir@/../flt-32/e_acosf.c \

View File

@ -232,6 +232,11 @@ extern float __kernel_cosf (float,float);
extern float __kernel_tanf (float,float,int);
extern int __kernel_rem_pio2f (float*,float*,int,int,int, const int32_t*);
extern float __atanf (float);
extern float __scalbnf (float x, int n);
extern float __floorf(float x);
extern int __isinff(float x);
/* internal functions. */
extern float __copysignf (float x, float __y);
@ -318,5 +323,11 @@ extern double __mpcos1 (double __x);
extern double __slowexp (double __x);
extern double __slowpow (double __x, double __y, double __z);
extern void __docos (double __x, double __dx, double __v[]);
extern double __scalbn (double x, int n);
extern double __floor(double x);
/* Prototypes for C99 math functions provided by GCC builtins. */
extern double fabs(double);
extern float fabsf(float);
#endif /* _MATH_PRIVATE_H_ */