+2002-06-15 Bruno Haible <bruno@clisp.org>
+
+ * javacomp.c (compile_java_class): Ignore gcj versions that start with
+ "3.0" or "3.1". (gcj 3.0.4 compiles GetURL.java to invalid bytecode,
+ that crashes with an IllegalAccessError when executed by gij 3.0.4 or
+ with a VerifyError when executed by Sun Java. Likewise for gcj 3.1.)
+
2002-05-29 Bruno Haible <bruno@clisp.org>
* linebreak.c (nonspacing_table_data, uc_width): Upgrade to
Program from A C O g T
$JAVAC unknown N n/a -O -g true
- gcj -C GCC 3.0 Y --classpath=P -O -g gcj --version | sed -e 's,^[^0-9]*,,' -e 1q | grep '^[3-9]' >/dev/null
+ gcj -C GCC 3.2 Y --classpath=P -O -g gcj --version | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null
javac JDK 1.1.8 Y -classpath P -O -g javac 2>/dev/null; test $? = 1
javac JDK 1.3.0 Y -classpath P -O -g javac 2>/dev/null; test $? -le 2
jikes Jikes 1.14 N -classpath P -O -g jikes 2>/dev/null; test $? = 1
{
/* Test for presence of gcj:
"gcj --version 2> /dev/null | \
- sed -e 's,^[^0-9]*,,' -e 1q | grep '^[3-9]' > /dev/null" */
+ sed -e 's,^[^0-9]*,,' -e 1q | \
+ sed -e '/^3\.[01]/d' | grep '^[3-9]' > /dev/null" */
char *argv[3];
pid_t child;
int fd[1];
if (child != -1)
{
/* Read the subprocess output, drop all lines except the first,
- and test whether the first digit found in the first line is
- >= 3. */
- char c;
+ drop all characters before the first digit, and test whether
+ the remaining string starts with a digit >= 3, but not with
+ "3.0" or "3.1". */
+ char c[3];
+ size_t count = 0;
- while (safe_read (fd[0], &c, 1) > 0)
+ while (safe_read (fd[0], &c[count], 1) > 0)
{
- if (c >= '0' && c <= '9')
+ if (c[count] == '\n')
+ break;
+ if (count == 0)
+ {
+ if (!(c[0] >= '0' && c[0] <= '9'))
+ continue;
+ gcj_present = (c[0] >= '3');
+ }
+ count++;
+ if (count == 3)
{
- gcj_present = (c >= '3' && c <= '9');
+ if (c[0] == '3' && c[1] == '.'
+ && (c[2] == '0' || c[2] == '1'))
+ gcj_present = false;
break;
}
- if (c == '\n')
- break;
}
- while (safe_read (fd[0], &c, 1) > 0)
+ while (safe_read (fd[0], &c[0], 1) > 0)
;
close (fd[0]);
+2002-06-15 Bruno Haible <bruno@clisp.org>
+
+ * javacomp.m4 (gt_JAVACOMP): Ignore gcj versions that start with
+ "3.0" or "3.1". (gcj 3.0.4 compiles GetURL.java to invalid bytecode,
+ that crashes with an IllegalAccessError when executed by gij 3.0.4 or
+ with a VerifyError when executed by Sun Java. Likewise for gcj 3.1.)
+
2002-06-14 Bruno Haible <bruno@clisp.org>
* lib-link.m4 (AC_LIB_RPATH): New option --disable-rpath.
popdef([AC_MSG_CHECKING])dnl
changequote(,)dnl
if test -n "$HAVE_GCJ_IN_PATH" \
- && gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | grep '^[3-9]' >/dev/null \
+ && gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null \
&& (
# See if libgcj.jar is well installed.
cat > conftest.java <<EOF