|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[RFC] update eclipse-ecj.jar to 3.5 (R3_5, or R3_5_maintainance)I updated eclipse-ecj.jar to 3.5, and GCCMain.java to work with 3.5; you can
find the jar file at http://people.ubuntu.com/~doko/tmp/ecj-3.5/ The diff to GCCMain.java is attached here. A 4.4 build using this jar does succeed. Matthias --- ../ecj-3.4.2/src/org.eclipse.jdt.core/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2009-07-26 19:58:55.000000000 +0200 +++ ./src/org.eclipse.jdt.core/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2009-07-28 18:38:34.000000000 +0200 @@ -23,7 +23,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; -import org.eclipse.jdt.core.compiler.InvalidInputException; import org.eclipse.jdt.internal.compiler.ClassFile; import org.eclipse.jdt.internal.compiler.CompilationResult; import org.eclipse.jdt.internal.compiler.env.AccessRestriction; @@ -76,7 +75,7 @@ System.exit(1); } - public CompilationUnit[] getCompilationUnits() throws InvalidInputException { + public CompilationUnit[] getCompilationUnits() { CompilationUnit[] units = super.getCompilationUnits(); for (int i = 0; i < units.length; ++i) this.commandLineCompilationUnits.add(units[i]); @@ -187,7 +186,7 @@ } } - protected void handleWarningToken(String token, boolean isEnabling) throws InvalidInputException { + protected void handleWarningToken(String token, boolean isEnabling) { // Recognize this for compatibility with older versions of gcj. if ("deprecated".equals(token)) //$NON-NLS-1$ token = "deprecation"; //$NON-NLS-1$ @@ -270,7 +269,7 @@ } } - private void handleWall(boolean enable) throws InvalidInputException { + private void handleWall(boolean enable) { // A somewhat arbitrary list. We use the GCC names // here, and the local handleWarningToken translates // for us. @@ -294,7 +293,7 @@ handleWarningToken("forbidden", enable); } - public void configure(String[] argv) throws InvalidInputException { + public void configure(String[] argv) { if ((argv == null) || (argv.length == 0)) { // This is a "can't happen". System.exit(1); @@ -316,7 +315,7 @@ try { // ensure encoding is supported new InputStreamReader(new ByteArrayInputStream(new byte[0]), encoding); } catch (UnsupportedEncodingException e) { - throw new InvalidInputException( + throw new IllegalArgumentException( this.bind("configure.unsupportedEncoding", encoding)); //$NON-NLS-1$ } this.options.put(CompilerOptions.OPTION_Encoding, encoding); @@ -327,7 +326,7 @@ errorMessage.append("-d"); //$NON-NLS-1$ errorMessage.append(' '); errorMessage.append(arg); - throw new InvalidInputException( + throw new IllegalArgumentException( this.bind("configure.duplicateOutputPath", errorMessage.toString())); //$NON-NLS-1$ } this.setDestinationPath(arg); @@ -336,12 +335,12 @@ } else if (currentArg.equals("-fzip-target")) { //$NON-NLS-1$ ++i; if (i >= argv.length) - throw new InvalidInputException(this.bind("gcc.zipArg")); //$NON-NLS-1$ + throw new IllegalArgumentException(this.bind("gcc.zipArg")); //$NON-NLS-1$ this.zipDestination = argv[i]; } else if (currentArg.equals("-fzip-dependency")) { //$NON-NLS-1$ ++i; if (i >= argv.length) - throw new InvalidInputException(this.bind("gcc.zipDepArg")); //$NON-NLS-1$ + throw new IllegalArgumentException(this.bind("gcc.zipDepArg")); //$NON-NLS-1$ this.zipDependencyDestination = argv[i]; } else if (currentArg.startsWith("-g")) { //$NON-NLS-1$ if (currentArg.equals("-g0")) { //$NON-NLS-1$ @@ -384,7 +383,7 @@ } else if (currentArg.equals("1.6") || currentArg.equals("6") || currentArg.equals("6.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6); } else { - throw new InvalidInputException(this.bind("configure.source", currentArg)); //$NON-NLS-1$ + throw new IllegalArgumentException(this.bind("configure.source", currentArg)); //$NON-NLS-1$ } } else if (currentArg.startsWith("-ftarget=")) { //$NON-NLS-1$ currentArg = getArgument(currentArg); @@ -403,7 +402,7 @@ } else if (currentArg.equals("jsr14")) { //$NON-NLS-1$ this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_JSR14); } else { - throw new InvalidInputException(this.bind("configure.targetJDK", currentArg)); //$NON-NLS-1$ + throw new IllegalArgumentException(this.bind("configure.targetJDK", currentArg)); //$NON-NLS-1$ } } else if (currentArg.equals("-ffilelist-file")) { //$NON-NLS-1$ haveFileList = true; @@ -430,7 +429,7 @@ // Classpath processing. ArrayList result = new ArrayList(); if (classpath == null) - throw new InvalidInputException(this.bind("gcc.noClasspath")); //$NON-NLS-1$ + throw new IllegalArgumentException(this.bind("gcc.noClasspath")); //$NON-NLS-1$ parsePath(result, classpath); // We must always create both output files, even if one is not used. |
|
|
Re: [RFC] update eclipse-ecj.jar to 3.5 (R3_5, or R3_5_maintainance)Matthias Klose wrote:
> I updated eclipse-ecj.jar to 3.5, and GCCMain.java to work with 3.5; you > can find the jar file at http://people.ubuntu.com/~doko/tmp/ecj-3.5/ > The diff to GCCMain.java is attached here. A 4.4 build using this jar > does succeed. What about: http://gcc.gnu.org/ml/java-patches/2009-q1/msg00049.html David Daney |
|
|
Re: [RFC] update eclipse-ecj.jar to 3.5 (R3_5, or R3_5_maintainance)>>>>> "Matthias" == Matthias Klose <doko@...> writes:
Matthias> I updated eclipse-ecj.jar to 3.5, and GCCMain.java to work Matthias> with 3.5; you can find the jar file at Matthias> http://people.ubuntu.com/~doko/tmp/ecj-3.5/ The diff to Matthias> GCCMain.java is attached here. A 4.4 build using this jar does Matthias> succeed. This seems fine to me. I gave you write access to the rhug repository. Could you please check this patch in there? And update the Makefile to reflect the correct CVS tag? Then we'll need to: * Update all the .class files. * Update the ecj download on gcc.gnu.org. I can handle the latter, just email me the .jar. Tom |
|
|
Re: [RFC] update eclipse-ecj.jar to 3.5 (R3_5, or R3_5_maintainance)>>>>> "David" == David Daney <ddaney@...> writes:
David> http://gcc.gnu.org/ml/java-patches/2009-q1/msg00049.html It seems like an ok idea to me. I added you to the rhug group. Please make sure your changes wind up in the next ecj .jar before I upload it. Thanks. Tom |
| Free embeddable forum powered by Nabble | Forum Help |