On Tue, 2006-02-28 at 20:41 +0100, Roman Kennke wrote: > Am Dienstag, den 28.02.2006, 14:28 -0500 schrieb Stuart Ballard: > > I figured out the reason why at least one of the compilers on my > > system was failing to build classpath. The version of ecj I have (from > > Ubuntu Breezy) doesn't appear to understand the "unused" parameter to > > the "-warn" flag, which lib/Makefile passes to it. > > ACK. I would like to see this fixed also.
The attached quick and dirty test would detect support for the unused warning flag. But I only have an ecj available that does have that flag. So please test (re-autogen, re-configure, etc) with an ecj that doesn't support it. Cheers, Mark
Index: m4/acinclude.m4
===================================================================
RCS file: /cvsroot/classpath/classpath/m4/acinclude.m4,v
retrieving revision 1.10
diff -u -r1.10 acinclude.m4
--- m4/acinclude.m4 21 Jan 2006 20:57:09 -0000 1.10
+++ m4/acinclude.m4 1 Mar 2006 08:59:54 -0000
@@ -459,4 +459,11 @@
else
AC_PATH_PROG(ECJ, "ecj")
fi
+ if test "x$ECJ" != "x"; then
+ if test -n "`$ECJ -warn:unused 2>&1 | grep "invalid warning: unused"`"; then
+ ECJWARNINGS='-warn:-deprecation,serial'
+ else
+ ECJWARNINGS='-warn:-deprecation,serial,unused'
+ fi
+ AC_SUBST(ECJWARNINGS)
])
Index: lib/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.111
diff -u -r1.111 Makefile.am
--- lib/Makefile.am 13 Feb 2006 19:13:16 -0000 1.111
+++ lib/Makefile.am 1 Mar 2006 08:59:54 -0000
@@ -29,7 +29,7 @@
JAVAC = $(GCJX) -g -encoding UTF-8 -classpath .:$(USER_CLASSLIB) -d . @classes
else
if FOUND_ECJ
-JAVAC = $(ECJ) -source 1.4 -encoding UTF-8 -warn:-deprecation,serial,unused -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
+JAVAC = $(ECJ) -source 1.4 -encoding UTF-8 $(ECJWARNINGS) -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
endif # FOUND_ECJ
endif # FOUND_GCJX
endif # FOUND_KJC
signature.asc
Description: This is a digitally signed message part

