Commit 9e4e0916 by Kazu Hirata Committed by Kazu Hirata

revert: no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.

config/
	Revert:
	2007-10-02  Richard Sandiford  <richard@codesourcery.com>
	* no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.

libstdc++/
	Revert:
	2007-10-02  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.
	* configure: Regenerate.

From-SVN: r128972
parent cfdf6784
2007-10-03 Kazu Hirata <kazu@codesourcery.com>
Revert:
2007-10-02 Richard Sandiford <richard@codesourcery.com>
* no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.
2007-10-02 Richard Sandiford <richard@codesourcery.com> 2007-10-02 Richard Sandiford <richard@codesourcery.com>
* no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function. * no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.
......
...@@ -59,11 +59,3 @@ fi) ...@@ -59,11 +59,3 @@ fi)
m4_divert_pop()dnl m4_divert_pop()dnl
])# GCC_NO_EXECUTABLES ])# 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])
2007-10-03 Kazu Hirata <kazu@codesourcery.com>
Revert:
2007-10-02 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.
* configure: Regenerate.
2007-10-02 Richard Sandiford <richard@codesourcery.com> 2007-10-02 Richard Sandiford <richard@codesourcery.com>
* acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add * acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add
......
...@@ -763,32 +763,24 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ ...@@ -763,32 +763,24 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS 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. # Check for the existence of <math.h> functions used if C99 is enabled.
AC_MSG_CHECKING([for ISO C99 support in <math.h>]) AC_MSG_CHECKING([for ISO C99 support in <math.h>])
AC_CACHE_VAL(ac_c99_math, [ AC_CACHE_VAL(ac_c99_math, [
GCC_TRY_COMPILE_OR_LINK( AC_TRY_COMPILE([#include <math.h>],
[#include <math.h> [fpclassify(0.0);
volatile double d1, d2; isfinite(0.0);
volatile int i;], isinf(0.0);
[i = fpclassify(d1); isnan(0.0);
i = isfinite(d1); isnormal(0.0);
i = isinf(d1); signbit(0.0);
i = isnan(d1); isgreater(0.0,0.0);
i = isnormal(d1); isgreaterequal(0.0,0.0);
i = signbit(d1); isless(0.0,0.0);
i = isgreater(d1, d2); islessequal(0.0,0.0);
i = isgreaterequal(d1, d2); islessgreater(0.0,0.0);
i = isless(d1, d2); islessgreater(0.0,0.0);
i = islessequal(d1, d2); isunordered(0.0,0.0);
i = islessgreater(d1, d2); ],[ac_c99_math=yes], [ac_c99_math=no])
i = islessgreater(d1, d2);
i = isunordered(d1, d2);
],[ac_c99_math=yes], [ac_c99_math=no])
]) ])
AC_MSG_RESULT($ac_c99_math) AC_MSG_RESULT($ac_c99_math)
if test x"$ac_c99_math" = x"yes"; then if test x"$ac_c99_math" = x"yes"; then
...@@ -806,54 +798,47 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ ...@@ -806,54 +798,47 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
ac_c99_complex=no; ac_c99_complex=no;
if test x"$ac_has_complex_h" = x"yes"; then if test x"$ac_has_complex_h" = x"yes"; then
AC_MSG_CHECKING([for ISO C99 support in <complex.h>]) AC_MSG_CHECKING([for ISO C99 support in <complex.h>])
GCC_TRY_COMPILE_OR_LINK( AC_TRY_COMPILE([#include <complex.h>],
[#include <complex.h> [typedef __complex__ float float_type; float_type tmpf;
typedef __complex__ float float_type; cabsf(tmpf);
typedef __complex__ double double_type; cargf(tmpf);
typedef __complex__ long double ld_type; ccosf(tmpf);
volatile float_type tmpf; ccoshf(tmpf);
volatile double_type tmpd; cexpf(tmpf);
volatile ld_type tmpld; clogf(tmpf);
volatile float f; csinf(tmpf);
volatile double d; csinhf(tmpf);
volatile long double ld;], csqrtf(tmpf);
[f = cabsf(tmpf); ctanf(tmpf);
f = cargf(tmpf); ctanhf(tmpf);
tmpf = ccosf(tmpf); cpowf(tmpf, tmpf);
tmpf = ccoshf(tmpf); typedef __complex__ double double_type; double_type tmpd;
tmpf = cexpf(tmpf); cabs(tmpd);
tmpf = clogf(tmpf); carg(tmpd);
tmpf = csinf(tmpf); ccos(tmpd);
tmpf = csinhf(tmpf); ccosh(tmpd);
tmpf = csqrtf(tmpf); cexp(tmpd);
tmpf = ctanf(tmpf); clog(tmpd);
tmpf = ctanhf(tmpf); csin(tmpd);
tmpf = cpowf(tmpf, tmpf); csinh(tmpd);
d = cabs(tmpd); csqrt(tmpd);
d = carg(tmpd); ctan(tmpd);
tmpd = ccos(tmpd); ctanh(tmpd);
tmpd = ccosh(tmpd); cpow(tmpd, tmpd);
tmpd = cexp(tmpd); typedef __complex__ long double ld_type; ld_type tmpld;
tmpd = clog(tmpd); cabsl(tmpld);
tmpd = csin(tmpd); cargl(tmpld);
tmpd = csinh(tmpd); ccosl(tmpld);
tmpd = csqrt(tmpd); ccoshl(tmpld);
tmpd = ctan(tmpd); cexpl(tmpld);
tmpd = ctanh(tmpd); clogl(tmpld);
tmpd = cpow(tmpd, tmpd); csinl(tmpld);
ld = cabsl(tmpld); csinhl(tmpld);
ld = cargl(tmpld); csqrtl(tmpld);
tmpld = ccosl(tmpld); ctanl(tmpld);
tmpld = ccoshl(tmpld); ctanhl(tmpld);
tmpld = cexpl(tmpld); cpowl(tmpld, tmpld);
tmpld = clogl(tmpld); ],[ac_c99_complex=yes], [ac_c99_complex=no])
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 fi
AC_MSG_RESULT($ac_c99_complex) AC_MSG_RESULT($ac_c99_complex)
if test x"$ac_c99_complex" = x"yes"; then if test x"$ac_c99_complex" = x"yes"; then
...@@ -866,43 +851,35 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ ...@@ -866,43 +851,35 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
# Check for the existence in <stdio.h> of vscanf, et. al. # Check for the existence in <stdio.h> of vscanf, et. al.
AC_MSG_CHECKING([for ISO C99 support in <stdio.h>]) AC_MSG_CHECKING([for ISO C99 support in <stdio.h>])
AC_CACHE_VAL(ac_c99_stdio, [ AC_CACHE_VAL(ac_c99_stdio, [
GCC_TRY_COMPILE_OR_LINK( AC_TRY_COMPILE([#include <stdio.h>
[#include <stdio.h> #include <stdarg.h>
#include <stdarg.h> void foo(char* fmt, ...)
void foo(char* fmt, ...) {
{ va_list args; va_start(args, fmt);
va_list args; va_start(args, fmt); vfscanf(stderr, "%i", args);
vfscanf(stderr, "%i", args); vscanf("%i", args);
vscanf("%i", args); vsnprintf(fmt, 0, "%i", args);
vsnprintf(fmt, 0, "%i", args); vsscanf(fmt, "%i", args);
vsscanf(fmt, "%i", args); }],
}], [snprintf("12", 0, "%i");],
[snprintf("12", 0, "%i");], [ac_c99_stdio=yes], [ac_c99_stdio=no])
[ac_c99_stdio=yes], [ac_c99_stdio=no])
]) ])
AC_MSG_RESULT($ac_c99_stdio) AC_MSG_RESULT($ac_c99_stdio)
# Check for the existence in <stdlib.h> of lldiv_t, et. al. # Check for the existence in <stdlib.h> of lldiv_t, et. al.
AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>]) AC_MSG_CHECKING([for ISO C99 support in <stdlib.h>])
AC_CACHE_VAL(ac_c99_stdlib, [ AC_CACHE_VAL(ac_c99_stdlib, [
GCC_TRY_COMPILE_OR_LINK( AC_TRY_COMPILE([#include <stdlib.h>],
[#include <stdlib.h> [char* tmp;
volatile float f; strtof("gnu", &tmp);
volatile long double ld; strtold("gnu", &tmp);
volatile unsigned long long ll; strtoll("gnu", &tmp, 10);
lldiv_t mydivt;], strtoull("gnu", &tmp, 10);
[char* tmp; llabs(10);
f = strtof("gnu", &tmp); lldiv(10,1);
ld = strtold("gnu", &tmp); atoll("10");
ll = strtoll("gnu", &tmp, 10); _Exit(0);
ll = strtoull("gnu", &tmp, 10); lldiv_t mydivt;],[ac_c99_stdlib=yes], [ac_c99_stdlib=no])
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) AC_MSG_RESULT($ac_c99_stdlib)
...@@ -963,7 +940,6 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [ ...@@ -963,7 +940,6 @@ AC_DEFUN([GLIBCXX_ENABLE_C99], [
<complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.]) <complex.h>, <stdio.h>, and <stdlib.h> can be used or exposed.])
fi fi
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE AC_LANG_RESTORE
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment