ping: Re: [patch] update ecj to ecj-3.8.2/4.2.2

Matthias Klose doko@ubuntu.com
Tue Dec 10 15:51:00 GMT 2013


Am 02.07.2013 21:04, schrieb Jon VanAlten:
> 
> 
> ----- Original Message -----
>> From: "Matthias Klose" <doko@ubuntu.com>
>> To: "Jon VanAlten" <jon.vanalten@redhat.com>
>> Cc: "GCJ-patches" <java-patches@gcc.gnu.org>, "Tom Tromey" <tromey@redhat.com>, "Andrew Haley" <aph@redhat.com>
>> Sent: Tuesday, July 2, 2013 3:36:14 AM
>> Subject: Re: ping: Re: [patch] update ecj to ecj-3.8.2/4.2.2
>>
>> On 06/26/13 21:23, Jon VanAlten wrote:
>>>
>>>  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
>>>
>>> So "checkout" target no longer does a checkout... seems a bit off. Is
>>> the commented git clone line left over from doing some of this before
>>> the official tag existed? Might want to drop that, and consider
>>> renaming the target to reflect its new behaviour.
>>
>> sure, I can rename that.  any suggestion?  The purpose is to make it clear
>> where
>> the source do come from.
> 
> If my reading of this is correct, this make target now does some moving
> about of things that are already checked out into the local filesystem.
> My suggestion would be to call it "prepare-sources" or just "prepare".
> 
>>
>>> +	tar -c -f - -C $(TAG)/org.eclipse.jdt.core/compiler org \
>>> +	  | tar -x -f - -C org.eclipse.jdt.core/
>>>
>>> Am I missing something or is this equivalent and simpler:
>>>
>>> +	mv $(TAG)/org.eclipse.jdt.core/compiler/org org.eclipse.jdt.core/
>>>
>>> +	tar -c -f - -C $(TAG)/org.eclipse.jdt.core/batch org \
>>> +	  | tar -x -f - -C org.eclipse.jdt.core/
>>>
>>> Ditto.
>>
>> yes, not having to run the checkout / pull from the web again.
>>
> 
> Right, so doing it as "cp -ar" instead of a "mv" would accomplish same?
> 
>>> As for the GCCMain portion of the change, yes it looks both necessary
>>> and correct. We do same in Fedora package (once again sorry it didn't
>>> get posted upstream due to my ignorance), and it would be nice to drop
>>> the patch once this is in a release.
>>
>> yes, having this upstream would be appreciated.
>>
>> So besides the style how to do fetch the sources, this looks ok?
>>
> 
> Yep.
> 
>> Is there another newer released ecj version which should be used instead?
>>
> 
> Let's check the authoritative source[1] for that.  It does seem as though
> they've done their 4.3 release, the sources for just ecj can be found
> under JDT Core Batch Compiler at [2].  News[3] does mention a few compiler
> improvements, but I might suggest to first push update to 3.8 and then
> update to latest in separate commit (so anyone else who consumes this can
> choose the version they prefer).
> 
> cheers,
> jon
> 
> [1] http://download.eclipse.org/eclipse/downloads/
> [2] http://download.eclipse.org/eclipse/downloads/drops4/R-4.3-201306052000/
> [3] http://download.eclipse.org/eclipse/downloads/drops4/R-4.3-201306052000/news/eclipse-news-part2.html
> 

now updated to build from the 4.3.1 release (ecj itself identified as 3.9.0).
Renamed the download target into prepare, and removed the comment.

Test built libjava with --enable-maintainer-mode. No regressions.

Ok to checkin?

  Matthias

-------------- next part --------------
2013-12-10  Matthias Klose  <doko@ubuntu.com>

	* Makefile (TAG): Set to R4_3_1. (cvsroot, login): Remove,
	(checkout): Rename to prepare.
	(prepare): 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	10 Dec 2013 15:47:35 -0000
@@ -1,4 +1,4 @@
-TAG = R3_5_1
+TAG = R4_3_1
 
 cvsroot = :pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
 
@@ -11,13 +11,26 @@
 	$(MAKE) compile
 	$(MAKE) ecj.jar ecj-source.tar.bz2
 
-login:
-	cvs -d $(cvsroot) login
+prepare:
+	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
 
-checkout:
-	cvs -d $(cvsroot) co -r$(TAG) org.eclipse.jdt.core
-
-SOURCES = org org.eclipse.jdt.core/batch org.eclipse.jdt.core/compiler
+SOURCES = org org.eclipse.jdt.core
 
 OUTPUT = bin
 
@@ -31,17 +44,18 @@
 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
 
 # Once per GCC release you should upload an appropriate jar.
 # Don't change these once the release is out.
@@ -51,4 +65,4 @@
 	scp ecj.jar $(destination)/ecj-$(RELEASE).jar
 	scp ecj-source.tar.bz2 $(destination)/ecj-$(RELEASE)-source.tar.bz2
 
-.PHONY: all login checkout ecj.jar compile upload
+.PHONY: all login prepare ecj.jar compile upload
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	10 Dec 2013 15:47:35 -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();
 


More information about the Java-patches mailing list