[cp-patches] FYI: [cp-tools] Don't warn about GCJ for versions >= 4.3

Andrew John Hughes gnu_andrew at member.fsf.org
Sun Jun 29 18:32:08 UTC 2008

This fixes the GCJ version warning so it only applies
to versions prior to 4.3 that used their own compiler
rather than ecj.


2008-06-29  Andrew John Hughes  <gnu_andrew at member.fsf.org>

	* m4/ac_prog_javac.m4:
	Only display GCJ warning on versions prior to 4.3.

Andrew :)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
-------------- next part --------------
Index: m4/ac_prog_javac.m4
RCS file: /sources/classpath/cp-tools/m4/ac_prog_javac.m4,v
retrieving revision 1.2
diff -u -u -r1.2 ac_prog_javac.m4
--- m4/ac_prog_javac.m4	29 Jun 2008 17:09:09 -0000	1.2
+++ m4/ac_prog_javac.m4	29 Jun 2008 17:21:06 -0000
@@ -12,18 +12,24 @@
 test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
-(echo "$JAVAC" | grep -e " -C$" >/dev/null 2>/dev/null) && AC_MSG_WARN([
-The build seems to be using gcj for bytecode generation.  Some
-versions of gcj are known to produce bad bytecode.  See here for a
-list of bugs that may be relevant:
+if (echo "$JAVAC" | grep -e "gcj" >/dev/null 2>/dev/null); then
+  case $(gcj -dumpversion) in
+    4.3*)
+      ;;
+    *)
+      AC_MSG_WARN([ The build seems to be using a version of gcj prior
+to 4.3 for bytecode generation.  Some versions of gcj are known to
+produce bad bytecode.  See here for a list of bugs that may be
-At least bug 19921 is known to affect gjdoc (in Feb 2005).
 You may want to set the environment variable JAVAC to an alternate
 compiler, such as jikes, to make sure that you end up with valid
+      ;;
+  esac

More information about the Classpath-patches mailing list