[patch] update ecj to ecj-3.8.2/4.2.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ecj.jar provided on ftp://gcc.gnu.org/pub/java wasn't updated anymore since
2008, having no support for java7.  It looks like this ecj is already used
within the Fedora disto, however only locally patched (at least I couldn't find
any mail sent to java-patches).

Find attached the changes required to build a new ecj.jar from the R3_8_2 git
tag.  The built files can be found at
http://people.debian.org/~doko/tmp/eclipse-gcj/. The resulting gcj -C looks
fine, building libjava with the new ecj.jar doesn't show any regressions, and
the testsuite doesn't show any regressions.  However the filenames for some
generated class and header files have changed for inner classes:

$ svn status|grep UIDefaults|sort -k1
!       classpath/lib/javax/swing/UIDefaults$1.class
!       classpath/lib/javax/swing/UIDefaults$2.class
!       classpath/lib/javax/swing/UIDefaults$3.class
!       classpath/lib/javax/swing/UIDefaults$4.class
?       classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$1.class
?       classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$2.class
?       classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$3.class
?       classpath/lib/javax/swing/UIDefaults$ProxyLazyValue$4.class
!       javax/swing/UIDefaults$1.h
!       javax/swing/UIDefaults$2.h
!       javax/swing/UIDefaults$3.h
!       javax/swing/UIDefaults$4.h
?       javax/swing/UIDefaults$ProxyLazyValue$1.h
?       javax/swing/UIDefaults$ProxyLazyValue$2.h
?       javax/swing/UIDefaults$ProxyLazyValue$3.h
?       javax/swing/UIDefaults$ProxyLazyValue$4.h
M       classpath/lib/javax/swing/plaf/basic/SharedUIDefaults.class
M       classpath/lib/javax/swing/UIDefaults.class
M       classpath/lib/javax/swing/UIDefaults$ProxyLazyValue.class
M
classpath/lib/javax/swing/UIManager$MultiplexUIDefaults$MultiplexEnumeration.class

See the attached svn-status.gz file for a complete diff (replace ! with D, ?
with A).

 - I'd like to ask Tom (or somebody else) to look at the patches
   for the rhug/java repository.

 - Ask to rebuild the .class and .h files using this new ecj.jar on the trunk,
   after the ecj.jar is uploaded.

There are issues building OpenJDK and IcedTea with this new compiler.  Please
see the IcedTea ML for a follow-up posting.

  Matthias
2013-04-13  Matthias Klose  <doko@xxxxxxxxxx>

	* Makefile (TAG): Set to R3_8_2 (cvsroot, login): Remove,
	(checkout): Download from git repository.
	(compile): Compile for 1.5, catch errors copying resource files,
	don't include the META-INF file.
	* org/eclipse/jdt/internal/compiler/batch/GCCMain.java: Adopt to
	new API.
	
Index: Makefile
===================================================================
RCS file: /cvs/rhug/eclipse-gcj/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	28 Sep 2009 17:38:31 -0000	1.10
+++ Makefile	13 Apr 2013 16:03:28 -0000
@@ -1,4 +1,4 @@
-TAG = R3_5_1
+TAG = R3_8_2
 
 cvsroot = :pserver:anonymous@xxxxxxxxxxxxxxx:/cvsroot/eclipse
 
@@ -11,13 +11,27 @@
 	$(MAKE) compile
 	$(MAKE) ecj.jar ecj-source.tar.bz2
 
-login:
-	cvs -d $(cvsroot) login
-
 checkout:
-	cvs -d $(cvsroot) co -r$(TAG) org.eclipse.jdt.core
+#	git clone -b R3_8_maintenance git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
+#	wget http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/snapshot/$(TAG).tar.gz
+	tar xf $(TAG).tar.gz
+	rm -rf org.eclipse.jdt.core
+	mkdir org.eclipse.jdt.core
+	cp $(TAG)/org.eclipse.jdt.core/scripts/about.html \
+	  org.eclipse.jdt.core/.
+	cp $(TAG)/org.eclipse.jdt.core/scripts/build.xml \
+	  org.eclipse.jdt.core/.
+	tar -c -f - -C $(TAG)/org.eclipse.jdt.core/compiler org \
+	  | tar -x -f - -C org.eclipse.jdt.core/
+	find org.eclipse.jdt.core -name CheckDebugAttributes.java | xargs -r rm -f
+	find org.eclipse.jdt.core -name BuildJarIndex.java | xargs -r rm -f
+	tar -c -f - -C $(TAG)/org.eclipse.jdt.core/batch org \
+	  | tar -x -f - -C org.eclipse.jdt.core/
+	mkdir -p org.eclipse.jdt.core/META-INF/services
+	printf 'org.eclipse.jdt.internal.compiler.tool.EclipseCompiler #Eclipse compiler' \
+	  > org.eclipse.jdt.core/META-INF/services/javax.tools.JavaCompiler
 
-SOURCES = org org.eclipse.jdt.core/batch org.eclipse.jdt.core/compiler
+SOURCES = org org.eclipse.jdt.core
 
 OUTPUT = bin
 
@@ -31,17 +45,19 @@
 compile:
 	@mkdir -p $(OUTPUT)
 	find $(SOURCES) -name '*.java' > List
-	ecj -d $(OUTPUT) -1.4 -nowarn -g @List
+	ecj -d $(OUTPUT) -1.5 -nowarn -g @List
+	set -e; \
 	here=`pwd`; for dir in $(SOURCES); do \
-	  (cd $$dir; find . -name '*.properties' -o -name '*.rsc' | \
+	  (cd $$dir; find . -name '*.properties' -o -name '*.props' -o -name '*.rsc' | \
 	   while read x; do \
 	     echo "cp $$x $$here/$(OUTPUT)/$$x"; \
+	     mkdir -p $$(dirname $$here/$(OUTPUT)/$$x); \
 	     cp $$x $$here/$(OUTPUT)/$$x; \
 	   done); \
 	done
 	cat gcc.properties >> $(OUTPUT)/org/eclipse/jdt/internal/compiler/batch/messages.properties
 	mkdir -p $(OUTPUT)/META-INF
-	cp org.eclipse.jdt.core/META-INF/MANIFEST.MF $(OUTPUT)/META-INF
+#	cp org.eclipse.jdt.core/META-INF/MANIFEST.MF $(OUTPUT)/META-INF
 
 # Once per GCC release you should upload an appropriate jar.
 # Don't change these once the release is out.
Index: org/eclipse/jdt/internal/compiler/batch/GCCMain.java
===================================================================
RCS file: /cvs/rhug/eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java,v
retrieving revision 1.8
diff -u -r1.8 GCCMain.java
--- org/eclipse/jdt/internal/compiler/batch/GCCMain.java	11 Sep 2009 10:59:21 -0000	1.8
+++ org/eclipse/jdt/internal/compiler/batch/GCCMain.java	13 Apr 2013 16:03:29 -0000
@@ -29,6 +29,7 @@
 import org.eclipse.jdt.internal.compiler.env.AccessRule;
 import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
 import org.eclipse.jdt.internal.compiler.util.Messages;
 import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
 
@@ -463,7 +464,7 @@
 		}
 
 		if (inhibitAllWarnings)
-			disableWarnings();
+			disableAll(ProblemSeverities.Warning);
 		if (treatWarningsAsErrors)
 			turnWarningsToErrors();
 

Attachment: svn-status.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux