This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix a couple of libstdc++ failures on uclinux
- From: Kazu Hirata <kazu at codesourcery dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Cc: richard at codesourcery dot com, joseph at codesourcery dot com
- Date: Thu, 26 Apr 2007 17:19:08 -0700
- Subject: [patch] Fix a couple of libstdc++ failures on uclinux
Hi,
[Sorry, I forgot to send this message to libstdc++@gcc.gnu.org.]
Attached is a patch to several libstdc++ failures on uclinux.
We have:
FAIL: 26_numerics/complex/13450.cc (test for excess errors)
FAIL: 26_numerics/complex/pow.cc (test for excess errors)
These testcases fail because of undefined references to cpow, carg,
clog, etc. libstdc++ determines that the C library has these
functions by performing compile tests, but that's actually not enough.
According to Joseph Myers, uClibc headers do not always disable the
declarations of functions that are compiled out of the library.
The patch fixes the problem by doing link tests instead of compile
tests.
Tested on m68k-uclinux. OK to apply?
Kazu Hirata
config/
2007-04-27 Richard Sandiford <richard@codesourcery.com>
* no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.
libstdc++-v3/
libstdc++/
2007-04-27 Richard Sandiford <richard@codesourcery.com>
* acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add
-fno-exceptions to CXXFLAGS. Use GCC_TRY_COMPILE_OR_LINK.
Make the tests assign results to volatile variables.
* libmath/Makefile.in: Regenerate.
* configure: Regenerate.
* Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* po/Makefile.in: Regenerate.
Index: config/no-executables.m4
===================================================================
--- config/no-executables.m4 (revision 124074)
+++ config/no-executables.m4 (working copy)
@@ -59,3 +59,11 @@ fi)
m4_divert_pop()dnl
])# GCC_NO_EXECUTABLES
+
+# Use the strongest available test out of AC_TRY_COMPILE and AC_TRY_LINK.
+AC_DEFUN([GCC_TRY_COMPILE_OR_LINK],
+[if test x$gcc_no_link = xyes; then
+ AC_TRY_COMPILE([$1], [$2], [$3], [$4])
+else
+ AC_TRY_LINK([$1], [$2], [$3], [$4])
+fi])
Index: libstdc++-v3/Makefile.in
===================================================================
--- libstdc++-v3/Makefile.in (revision 124074)
+++ libstdc++-v3/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Index: libstdc++-v3/acinclude.m4
===================================================================
--- libstdc++-v3/acinclude.m4 (revision 124074)
+++ libstdc++-v3/acinclude.m4 (working copy)
@@ -765,24 +765,32 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
+ # Use -fno-exceptions so that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
# Check for the existence of <math.h> functions used if C99 is enabled.
AC_MSG_CHECKING([for ISO C99 support in <math.h>])
AC_CACHE_VAL(ac_c99_math, [
- AC_TRY_COMPILE([#include <math.h>],
- [fpclassify(0.0);
- isfinite(0.0);
- isinf(0.0);
- isnan(0.0);
- isnormal(0.0);
- signbit(0.0);
- isgreater(0.0,0.0);
- isgreaterequal(0.0,0.0);
- isless(0.0,0.0);
- islessequal(0.0,0.0);
- islessgreater(0.0,0.0);
- islessgreater(0.0,0.0);
- isunordered(0.0,0.0);
- ],[ac_c99_math=yes], [ac_c99_math=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <math.h>
+ volatile double d1, d2;
+ volatile int i;],
+ [i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+ ],[ac_c99_math=yes], [ac_c99_math=no])
])
AC_MSG_RESULT($ac_c99_math)
if test x"$ac_c99_math" = x"yes"; then
@@ -800,47 +808,54 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then
AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
- AC_TRY_COMPILE([#include <complex.h>],
- [typedef __complex__ float float_type; float_type tmpf;
- cabsf(tmpf);
- cargf(tmpf);
- ccosf(tmpf);
- ccoshf(tmpf);
- cexpf(tmpf);
- clogf(tmpf);
- csinf(tmpf);
- csinhf(tmpf);
- csqrtf(tmpf);
- ctanf(tmpf);
- ctanhf(tmpf);
- cpowf(tmpf, tmpf);
- typedef __complex__ double double_type; double_type tmpd;
- cabs(tmpd);
- carg(tmpd);
- ccos(tmpd);
- ccosh(tmpd);
- cexp(tmpd);
- clog(tmpd);
- csin(tmpd);
- csinh(tmpd);
- csqrt(tmpd);
- ctan(tmpd);
- ctanh(tmpd);
- cpow(tmpd, tmpd);
- typedef __complex__ long double ld_type; ld_type tmpld;
- cabsl(tmpld);
- cargl(tmpld);
- ccosl(tmpld);
- ccoshl(tmpld);
- cexpl(tmpld);
- clogl(tmpld);
- csinl(tmpld);
- csinhl(tmpld);
- csqrtl(tmpld);
- ctanl(tmpld);
- ctanhl(tmpld);
- cpowl(tmpld, tmpld);
- ],[ac_c99_complex=yes], [ac_c99_complex=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;],
+ [f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+ ],[ac_c99_complex=yes], [ac_c99_complex=no])
fi
AC_MSG_RESULT($ac_c99_complex)
if test x"$ac_c99_complex" = x"yes"; then
@@ -853,35 +868,43 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
# Check for the existence in <stdio.h> of vscanf, et. al.
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
AC_CACHE_VAL(ac_c99_stdio, [
- AC_TRY_COMPILE([#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- }],
- [snprintf("12", 0, "%i");],
- [ac_c99_stdio=yes], [ac_c99_stdio=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }],
+ [snprintf("12", 0, "%i");],
+ [ac_c99_stdio=yes], [ac_c99_stdio=no])
])
AC_MSG_RESULT($ac_c99_stdio)
# Check for the existence in <stdlib.h> of lldiv_t, et. al.
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
AC_CACHE_VAL(ac_c99_stdlib, [
- AC_TRY_COMPILE([#include <stdlib.h>],
- [char* tmp;
- strtof("gnu", &tmp);
- strtold("gnu", &tmp);
- strtoll("gnu", &tmp, 10);
- strtoull("gnu", &tmp, 10);
- llabs(10);
- lldiv(10,1);
- atoll("10");
- _Exit(0);
- lldiv_t mydivt;],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
+ GCC_TRY_COMPILE_OR_LINK(
+ [#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;],
+ [char* tmp;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
+ ],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
])
AC_MSG_RESULT($ac_c99_stdlib)
@@ -942,6 +965,7 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
<complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
fi
+ CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
fi
Index: libstdc++-v3/aclocal.m4
===================================================================
--- libstdc++-v3/aclocal.m4 (revision 124074)
+++ libstdc++-v3/aclocal.m4 (working copy)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
@@ -28,7 +28,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.6])])
+ [AM_AUTOMAKE_VERSION([1.9.5])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
Index: libstdc++-v3/configure
===================================================================
--- libstdc++-v3/configure (revision 124074)
+++ libstdc++-v3/configure (working copy)
@@ -7046,6 +7046,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXX
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ # Use -fno-exceptions so that the C driver can link these tests without
+ # hitting undefined references to personality routines.
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+
# Check for the existence of <math.h> functions used if C99 is enabled.
echo "$as_me:$LINENO: checking for ISO C99 support in <math.h>" >&5
echo $ECHO_N "checking for ISO C99 support in <math.h>... $ECHO_C" >&6
@@ -7053,6 +7058,7 @@ echo $ECHO_N "checking for ISO C99 suppo
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test x$gcc_no_link = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7060,22 +7066,24 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <math.h>
+ volatile double d1, d2;
+ volatile int i;
int
main ()
{
-fpclassify(0.0);
- isfinite(0.0);
- isinf(0.0);
- isnan(0.0);
- isnormal(0.0);
- signbit(0.0);
- isgreater(0.0,0.0);
- isgreaterequal(0.0,0.0);
- isless(0.0,0.0);
- islessequal(0.0,0.0);
- islessgreater(0.0,0.0);
- islessgreater(0.0,0.0);
- isunordered(0.0,0.0);
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
;
return 0;
@@ -7111,6 +7119,74 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_math=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+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>
+ volatile double d1, d2;
+ volatile int i;
+int
+main ()
+{
+i = fpclassify(d1);
+ i = isfinite(d1);
+ i = isinf(d1);
+ i = isnan(d1);
+ i = isnormal(d1);
+ i = signbit(d1);
+ i = isgreater(d1, d2);
+ i = isgreaterequal(d1, d2);
+ i = isless(d1, d2);
+ i = islessequal(d1, d2);
+ i = islessgreater(d1, d2);
+ i = islessgreater(d1, d2);
+ i = isunordered(d1, d2);
+
+ ;
+ 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_cxx_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
+ ac_c99_math=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_math=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
@@ -7436,55 +7512,62 @@ done
if test x"$ac_has_complex_h" = x"yes"; then
echo "$as_me:$LINENO: checking for ISO C99 support in <complex.h>" >&5
echo $ECHO_N "checking for ISO C99 support in <complex.h>... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
+ if test x$gcc_no_link = xyes; then
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
int
main ()
{
-typedef __complex__ float float_type; float_type tmpf;
- cabsf(tmpf);
- cargf(tmpf);
- ccosf(tmpf);
- ccoshf(tmpf);
- cexpf(tmpf);
- clogf(tmpf);
- csinf(tmpf);
- csinhf(tmpf);
- csqrtf(tmpf);
- ctanf(tmpf);
- ctanhf(tmpf);
- cpowf(tmpf, tmpf);
- typedef __complex__ double double_type; double_type tmpd;
- cabs(tmpd);
- carg(tmpd);
- ccos(tmpd);
- ccosh(tmpd);
- cexp(tmpd);
- clog(tmpd);
- csin(tmpd);
- csinh(tmpd);
- csqrt(tmpd);
- ctan(tmpd);
- ctanh(tmpd);
- cpow(tmpd, tmpd);
- typedef __complex__ long double ld_type; ld_type tmpld;
- cabsl(tmpld);
- cargl(tmpld);
- ccosl(tmpld);
- ccoshl(tmpld);
- cexpl(tmpld);
- clogl(tmpld);
- csinl(tmpld);
- csinhl(tmpld);
- csqrtl(tmpld);
- ctanl(tmpld);
- ctanhl(tmpld);
- cpowl(tmpld, tmpld);
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
;
return 0;
@@ -7520,6 +7603,104 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_complex=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <complex.h>
+ typedef __complex__ float float_type;
+ typedef __complex__ double double_type;
+ typedef __complex__ long double ld_type;
+ volatile float_type tmpf;
+ volatile double_type tmpd;
+ volatile ld_type tmpld;
+ volatile float f;
+ volatile double d;
+ volatile long double ld;
+int
+main ()
+{
+f = cabsf(tmpf);
+ f = cargf(tmpf);
+ tmpf = ccosf(tmpf);
+ tmpf = ccoshf(tmpf);
+ tmpf = cexpf(tmpf);
+ tmpf = clogf(tmpf);
+ tmpf = csinf(tmpf);
+ tmpf = csinhf(tmpf);
+ tmpf = csqrtf(tmpf);
+ tmpf = ctanf(tmpf);
+ tmpf = ctanhf(tmpf);
+ tmpf = cpowf(tmpf, tmpf);
+ d = cabs(tmpd);
+ d = carg(tmpd);
+ tmpd = ccos(tmpd);
+ tmpd = ccosh(tmpd);
+ tmpd = cexp(tmpd);
+ tmpd = clog(tmpd);
+ tmpd = csin(tmpd);
+ tmpd = csinh(tmpd);
+ tmpd = csqrt(tmpd);
+ tmpd = ctan(tmpd);
+ tmpd = ctanh(tmpd);
+ tmpd = cpow(tmpd, tmpd);
+ ld = cabsl(tmpld);
+ ld = cargl(tmpld);
+ tmpld = ccosl(tmpld);
+ tmpld = ccoshl(tmpld);
+ tmpld = cexpl(tmpld);
+ tmpld = clogl(tmpld);
+ tmpld = csinl(tmpld);
+ tmpld = csinhl(tmpld);
+ tmpld = csqrtl(tmpld);
+ tmpld = ctanl(tmpld);
+ tmpld = ctanhl(tmpld);
+ tmpld = cpowl(tmpld, tmpld);
+
+ ;
+ 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_cxx_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
+ ac_c99_complex=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_complex=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
echo "$as_me:$LINENO: result: $ac_c99_complex" >&5
echo "${ECHO_T}$ac_c99_complex" >&6
@@ -7538,6 +7719,7 @@ echo $ECHO_N "checking for ISO C99 suppo
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test x$gcc_no_link = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7545,15 +7727,15 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
- #include <stdarg.h>
- void foo(char* fmt, ...)
- {
- va_list args; va_start(args, fmt);
- vfscanf(stderr, "%i", args);
- vscanf("%i", args);
- vsnprintf(fmt, 0, "%i", args);
- vsscanf(fmt, "%i", args);
- }
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }
int
main ()
{
@@ -7592,6 +7774,68 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_stdio=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <stdarg.h>
+ void foo(char* fmt, ...)
+ {
+ va_list args; va_start(args, fmt);
+ vfscanf(stderr, "%i", args);
+ vscanf("%i", args);
+ vsnprintf(fmt, 0, "%i", args);
+ vsscanf(fmt, "%i", args);
+ }
+int
+main ()
+{
+snprintf("12", 0, "%i");
+ ;
+ 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_cxx_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
+ ac_c99_stdio=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdio=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
@@ -7605,6 +7849,7 @@ echo $ECHO_N "checking for ISO C99 suppo
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test x$gcc_no_link = xyes; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7612,19 +7857,25 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
int
main ()
{
char* tmp;
- strtof("gnu", &tmp);
- strtold("gnu", &tmp);
- strtoll("gnu", &tmp, 10);
- strtoull("gnu", &tmp, 10);
- llabs(10);
- lldiv(10,1);
- atoll("10");
- _Exit(0);
- lldiv_t mydivt;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(0);
+
;
return 0;
}
@@ -7659,6 +7910,74 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_c99_stdlib=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+ volatile float f;
+ volatile long double ld;
+ volatile unsigned long long ll;
+ lldiv_t mydivt;
+int
+main ()
+{
+char* tmp;
+ f = strtof("gnu", &tmp);
+ ld = strtold("gnu", &tmp);
+ ll = strtoll("gnu", &tmp, 10);
+ ll = strtoull("gnu", &tmp, 10);
+ ll = llabs(10);
+ mydivt = lldiv(10,1);
+ ll = mydivt.quot;
+ ll = mydivt.rem;
+ ll = atoll("10");
+ _Exit(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_cxx_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
+ ac_c99_stdlib=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_c99_stdlib=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
fi
@@ -7996,6 +8315,7 @@ _ACEOF
fi
+ CXXFLAGS="$ac_save_CXXFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8181,7 +8501,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style.
cat > conftest.$ac_ext << EOF
-#line 8184 "configure"
+#line 8504 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
Index: libstdc++-v3/include/Makefile.in
===================================================================
--- libstdc++-v3/include/Makefile.in (revision 124074)
+++ libstdc++-v3/include/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Index: libstdc++-v3/libmath/Makefile.in
===================================================================
--- libstdc++-v3/libmath/Makefile.in (revision 124074)
+++ libstdc++-v3/libmath/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -14,6 +14,8 @@
@SET_MAKE@
+SOURCES = $(libmath_la_SOURCES)
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
Index: libstdc++-v3/libsupc++/Makefile.in
===================================================================
--- libstdc++-v3/libsupc++/Makefile.in (revision 124074)
+++ libstdc++-v3/libsupc++/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,6 +15,8 @@
@SET_MAKE@
+SOURCES = $(libsupc___la_SOURCES) $(libsupc__convenience_la_SOURCES)
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
Index: libstdc++-v3/po/Makefile.in
===================================================================
--- libstdc++-v3/po/Makefile.in (revision 124074)
+++ libstdc++-v3/po/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Index: libstdc++-v3/src/Makefile.in
===================================================================
--- libstdc++-v3/src/Makefile.in (revision 124074)
+++ libstdc++-v3/src/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -14,6 +14,8 @@
@SET_MAKE@
+SOURCES = $(libstdc___la_SOURCES)
+
srcdir = @srcdir@
top_srcdir = @top_srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
Index: libstdc++-v3/testsuite/Makefile.in
===================================================================
--- libstdc++-v3/testsuite/Makefile.in (revision 124074)
+++ libstdc++-v3/testsuite/Makefile.in (working copy)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,