This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[bug bootstrap/15194] [3.3] Fastjar configure fails on build compilerswithout long long
- From: Kelley Cook <kcook at gcc dot gnu dot org>
- To: gcc-bugzilla at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jones Desougi <jones at ingate dot com>, Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Date: Wed, 07 Jul 2004 13:53:41 -0400
- Subject: [bug bootstrap/15194] [3.3] Fastjar configure fails on build compilerswithout long long
- Hop-count: 1
Due to the fact that GCC 3.3's fastjar still used autoconf 2.13, I think
using Jones idea is more prudent than a backport from 3.4.
When examining fastjar's use of SIZEOF_* macros we can always safely set
the size to zero if it doesn't exist which makes the changes even
simpler and less risky for 3.3.5.
Tested by building fastjar on i686-pc-cygwin which resulted in no
changes compared to previous the patch.
Then I reconfigured and built with CFLAGS="-O2 -pedantic-errors" which
after this patch sets SIZEOF_LONG_LONG=0. Prior to the patch it would
error out.
Gaby (or anyone else), would this be OK for 3.3? This bug is a
regression from 3.2.
2004-07-07 Jones Desougi <jones@ingate.com>
Kelley Cook <kcook@gcc.gnu.org>
PR bootstrap/15194
* acinclude.m4 (gcc_AC_COMPILE_CHECK_SIZEOF): Return 0 when type
doesn't exist.
* aclocal.m4: Regenerate.
* configure: Regenearate.
diff -prud ../fastjar.orig/acinclude.m4 ./acinclude.m4
--- ../fastjar.orig/acinclude.m4 2002-09-09 17:19:16.000000000 -0400
+++ ./acinclude.m4 2004-07-07 13:14:45.387812200 -0400
@@ -1,6 +1,7 @@
dnl Host type sizes probe.
dnl By Kaveh R. Ghazi. One typo fixed since.
+dnl Modified to return a size of 0 if type doesn't exist
dnl
AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl
@@ -20,7 +21,7 @@ $2
done
])
if test x$AC_CV_NAME = x ; then
- AC_MSG_ERROR([cannot determine a size for $1])
+ AC_CV_NAME=0
fi
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
diff -prud ../fastjar.orig/aclocal.m4 ./aclocal.m4
--- ../fastjar.orig/aclocal.m4 2004-06-30 18:53:03.000000000 -0400
+++ ./aclocal.m4 2004-07-07 13:13:19.967539200 -0400
@@ -13,6 +13,7 @@ dnl PARTICULAR PURPOSE.
dnl Host type sizes probe.
dnl By Kaveh R. Ghazi. One typo fixed since.
+dnl Modified to return a size of 0 if type doesn't exist
dnl
AC_DEFUN([gcc_AC_COMPILE_CHECK_SIZEOF],
[changequote(<<, >>)dnl
@@ -32,7 +33,7 @@ $2
done
])
if test x$AC_CV_NAME = x ; then
- AC_MSG_ERROR([cannot determine a size for $1])
+ AC_CV_NAME=0
fi
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
diff -prud ../fastjar.orig/configure ./configure
--- ../fastjar.orig/configure 2004-06-30 18:53:03.000000000 -0400
+++ ./configure 2004-07-07 13:24:32.644678500 -0400
@@ -1876,7 +1876,7 @@ done
fi
if test x$ac_cv_sizeof_char = x ; then
- { echo "configure: error: cannot determine a size for char" 1>&2; exit 1; }
+ ac_cv_sizeof_char=0
fi
echo "$ac_t""$ac_cv_sizeof_char" 1>&6
cat >> confdefs.h <<EOF
@@ -1915,7 +1915,7 @@ done
fi
if test x$ac_cv_sizeof_short = x ; then
- { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
+ ac_cv_sizeof_short=0
fi
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
cat >> confdefs.h <<EOF
@@ -1954,7 +1954,7 @@ done
fi
if test x$ac_cv_sizeof_int = x ; then
- { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
+ ac_cv_sizeof_int=0
fi
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
cat >> confdefs.h <<EOF
@@ -1993,7 +1993,7 @@ done
fi
if test x$ac_cv_sizeof_long = x ; then
- { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
+ ac_cv_sizeof_long=0
fi
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
cat >> confdefs.h <<EOF
@@ -2032,7 +2032,7 @@ done
fi
if test x$ac_cv_sizeof_long_long = x ; then
- { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
+ ac_cv_sizeof_long_long=0
fi
echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
cat >> confdefs.h <<EOF