This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix array aliasing conftest


On Friday 17 April 2009 18:21:44 Jeff Johnston wrote:
> The AC_TRY_COMPILE in libm/configure.in has been translated to
> AC_TRY_COMMAND.

I just noticed the spaces at the acnewlib_cv_type_long_double which lead to a 
failing conftest. Your change fixed that for libm - thanks. 
The libc/configure.in has the same test that should be changed in the same 
manner. Is there a way to prevent that redundant long double check for libc 
and libm? The tiny patch is attached.

> -- Jeff J.

Ken


newlib/ChangeLog:

2009-04-09  Ken Werner  <ken.werner@de.ibm.com>

        * libc/configure.in: Change AC_TRY_COMPILE to AC_TRY_COMMAND to
        avoid executable test.
        * libc/configure: Regenerate.

Index: src/newlib/libc/configure.in
===================================================================
--- src.orig/newlib/libc/configure.in
+++ src/newlib/libc/configure.in
@@ -144,10 +144,20 @@ dnl Autoconf 2.59 doesn't support the AC
 dnl   AC_TYPE_LONG_DOUBLE
 dnl   AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$ac_cv_type_long_double" = x"yes")
 dnl we specify our own long double test.
-AC_CACHE_CHECK([Checking long double support], [acnewlib_cv_type_long_double],
-  [AC_TRY_COMPILE([], [long double foo = 0.0L;],
-    [acnewlib_cv_type_long_double = yes;],
-    [acnewlib_cv_type_long_double = no;])])
+AC_CACHE_CHECK([Checking long double support], [acnewlib_cv_type_long_double],[dnl
+cat > conftest.c <<EOF
+int main() {
+long double x = 0.0L;
+return 0;
+}
+EOF
+if AC_TRY_COMMAND([${CC} $CFLAGS $CPPFLAGS -c conftest.c 1>&AS_MESSAGE_LOG_FD])
+then
+  acnewlib_cv_type_long_double=yes
+else
+  acnewlib_cv_type_long_double=no
+fi
+rm -f conftest*])
 AM_CONDITIONAL(HAVE_LONG_DOUBLE, test x"$acnewlib_cv_type_long_double" = x"yes")
 
 if test -n "${machine_dir}"; then

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]