Initial checkin for the ecj package
This commit is contained in:
parent
5b8c236c4a
commit
79be5b8347
@ -0,0 +1,2 @@
|
||||
ecj-gcj.tar.bz2
|
||||
ecjsrc-3.4.2.zip
|
44
ecj-defaultto1.5.patch
Normal file
44
ecj-defaultto1.5.patch
Normal file
@ -0,0 +1,44 @@
|
||||
### Eclipse Workspace Patch 1.0
|
||||
#P org.eclipse.jdt.core
|
||||
Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
|
||||
===================================================================
|
||||
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v
|
||||
retrieving revision 1.203
|
||||
diff -u -r1.203 CompilerOptions.java
|
||||
--- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 14 Apr 2008 19:41:33 -0000 1.203
|
||||
+++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 15 Dec 2008 19:50:02 -0000
|
||||
@@ -253,9 +253,9 @@
|
||||
// By default only lines and source attributes are generated.
|
||||
public int produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES;
|
||||
|
||||
- public long complianceLevel = ClassFileConstants.JDK1_4; // by default be compliant with 1.4
|
||||
- public long sourceLevel = ClassFileConstants.JDK1_3; //1.3 source behavior by default
|
||||
- public long targetJDK = ClassFileConstants.JDK1_2; // default generates for JVM1.2
|
||||
+ public long complianceLevel = ClassFileConstants.JDK1_5; // by default be compliant with 1.4
|
||||
+ public long sourceLevel = ClassFileConstants.JDK1_5; //1.3 source behavior by default
|
||||
+ public long targetJDK = ClassFileConstants.JDK1_5; // default generates for JVM1.2
|
||||
|
||||
// source encoding format
|
||||
public String defaultEncoding = null; // will use the platform default encoding
|
||||
@@ -757,7 +757,7 @@
|
||||
} else if (DISABLED.equals(optionValue)) {
|
||||
this.reportUnusedParameterIncludeDocCommentReference = false;
|
||||
}
|
||||
- }
|
||||
+ }
|
||||
if ((optionValue = optionsMap.get(OPTION_ReportSpecialParameterHidingField)) != null) {
|
||||
if (ENABLED.equals(optionValue)) {
|
||||
this.reportSpecialParameterHidingField = true;
|
||||
@@ -944,10 +944,10 @@
|
||||
}
|
||||
if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocComments)) != null) {
|
||||
updateSeverity(MissingJavadocComments, optionValue);
|
||||
- }
|
||||
+ }
|
||||
if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocTagDescription)) != null) {
|
||||
this.reportMissingJavadocTagDescription = (String) optionValue;
|
||||
- }
|
||||
+ }
|
||||
if ((optionValue = optionsMap.get(OPTION_ReportMissingJavadocCommentsVisibility)) != null) {
|
||||
if (PUBLIC.equals(optionValue)) {
|
||||
this.reportMissingJavadocCommentsVisibility = ClassFileConstants.AccPublic;
|
196
ecj-rpmdebuginfo.patch
Normal file
196
ecj-rpmdebuginfo.patch
Normal file
@ -0,0 +1,196 @@
|
||||
### Eclipse Workspace Patch 1.0
|
||||
#P org.eclipse.jdt.core
|
||||
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
|
||||
===================================================================
|
||||
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
|
||||
retrieving revision 1.327
|
||||
diff -u -r1.327 Main.java
|
||||
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
|
||||
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
|
||||
@@ -268,22 +268,22 @@
|
||||
if ((startPosition > endPosition)
|
||||
|| ((startPosition < 0) && (endPosition < 0))
|
||||
|| length == 0)
|
||||
- return Messages.problem_noSourceInformation;
|
||||
+ return Messages.problem_noSourceInformation;
|
||||
|
||||
StringBuffer errorBuffer = new StringBuffer();
|
||||
if ((bits & Main.Logger.EMACS) == 0) {
|
||||
- errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
|
||||
+ errorBuffer.append(' ').append(Messages.bind(Messages.problem_atLine, String.valueOf(problem.getSourceLineNumber())));
|
||||
errorBuffer.append(Util.LINE_SEPARATOR);
|
||||
}
|
||||
errorBuffer.append('\t');
|
||||
-
|
||||
+
|
||||
char c;
|
||||
final char SPACE = '\u0020';
|
||||
final char MARK = '^';
|
||||
final char TAB = '\t';
|
||||
//the next code tries to underline the token.....
|
||||
//it assumes (for a good display) that token source does not
|
||||
- //contain any \r \n. This is false on statements !
|
||||
+ //contain any \r \n. This is false on statements !
|
||||
//(the code still works but the display is not optimal !)
|
||||
|
||||
// expand to line limits
|
||||
@@ -295,11 +295,11 @@
|
||||
for (end = endPosition >= length ? length - 1 : endPosition ; end+1 < length; end++) {
|
||||
if ((c = unitSource[end + 1]) == '\r' || c == '\n') break;
|
||||
}
|
||||
-
|
||||
+
|
||||
// trim left and right spaces/tabs
|
||||
while ((c = unitSource[begin]) == ' ' || c == '\t') begin++;
|
||||
//while ((c = unitSource[end]) == ' ' || c == '\t') end--; TODO (philippe) should also trim right, but all tests are to be updated
|
||||
-
|
||||
+
|
||||
// copy source
|
||||
errorBuffer.append(unitSource, begin, end-begin+1);
|
||||
errorBuffer.append(Util.LINE_SEPARATOR).append("\t"); //$NON-NLS-1$
|
||||
@@ -424,7 +424,7 @@
|
||||
String.valueOf(generateTime),
|
||||
String.valueOf(((int) (generateTime * 1000.0 / time)) / 10.0),
|
||||
}));
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
public void logClassFile(boolean generatePackagesStructure, String outputPath, String relativeFileName) {
|
||||
if ((this.tagBits & Logger.XML) != 0) {
|
||||
@@ -916,7 +916,7 @@
|
||||
this.main.bind("compile.totalTime", //$NON-NLS-1$
|
||||
new String[] {
|
||||
String.valueOf(time),
|
||||
- }));
|
||||
+ }));
|
||||
}
|
||||
if ((this.main.timing & Main.TIMING_DETAILED) != 0) {
|
||||
this.printlnOut(
|
||||
@@ -1119,7 +1119,7 @@
|
||||
this.endTag(Logger.STATS);
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
private void printTag(String name, HashMap params, boolean insertNewLine, boolean closeTag) {
|
||||
if (this.log != null) {
|
||||
((GenericXMLWriter) this.log).printTag(name, parameters, true, insertNewLine, closeTag);
|
||||
@@ -1245,12 +1245,12 @@
|
||||
|
||||
boolean warnJavadocOn;
|
||||
boolean warnAllJavadocOn;
|
||||
-
|
||||
+
|
||||
public Compiler batchCompiler;
|
||||
/* Bundle containing messages */
|
||||
public ResourceBundle bundle;
|
||||
protected FileSystem.Classpath[] checkedClasspaths;
|
||||
-
|
||||
+
|
||||
public Locale compilerLocale;
|
||||
public CompilerOptions compilerOptions; // read-only
|
||||
public CompilationProgress progress;
|
||||
@@ -1299,7 +1299,7 @@
|
||||
public static final int TIMING_DISABLED = 0;
|
||||
public static final int TIMING_ENABLED = 1;
|
||||
public static final int TIMING_DETAILED = 2;
|
||||
-
|
||||
+
|
||||
public int timing = TIMING_DISABLED;
|
||||
public CompilerStats[] compilerStats;
|
||||
public boolean verbose = false;
|
||||
@@ -1312,7 +1312,7 @@
|
||||
// two uses: recognize 'none' in options; code the singleton none
|
||||
// for the '-d none' option (wherever it may be found)
|
||||
public static final int DEFAULT_SIZE_CLASSPATH = 4;
|
||||
-
|
||||
+
|
||||
public static final String NONE = "none"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
@@ -1562,7 +1562,7 @@
|
||||
}
|
||||
/**
|
||||
* Return true if and only if the running VM supports the given minimal version.
|
||||
- *
|
||||
+ *
|
||||
* <p>This only checks the major version, since the minor version is always 0 (at least for the useful cases).</p>
|
||||
* <p>The given minimalSupportedVersion is one of the constants:</p>
|
||||
* <ul>
|
||||
@@ -2536,8 +2536,8 @@
|
||||
mode = DEFAULT;
|
||||
continue;
|
||||
}
|
||||
-
|
||||
- // set DocCommentSupport, with appropriate side effects on defaults if
|
||||
+
|
||||
+ // set DocCommentSupport, with appropriate side effects on defaults if
|
||||
// javadoc is not enabled
|
||||
if (this.enableJavadocOn) {
|
||||
this.options.put(
|
||||
@@ -2601,7 +2601,7 @@
|
||||
this.logger.logVersion(printVersionRequired);
|
||||
|
||||
validateOptions(didSpecifyCompliance);
|
||||
-
|
||||
+
|
||||
// Enable annotation processing by default in batch mode when compliance is at least 1.6
|
||||
// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=185768
|
||||
if (!didSpecifyDisabledAnnotationProcessing
|
||||
@@ -2609,6 +2609,29 @@
|
||||
this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
|
||||
}
|
||||
|
||||
+ {
|
||||
+ // If we're building an RPM, force full debugging info to
|
||||
+ // be generated, no matter what options have been passed
|
||||
+ // by Ant. This is something of a kludge, but it is far
|
||||
+ // better than the alternative, which is having class
|
||||
+ // files with debug info mysteriously missing.
|
||||
+
|
||||
+ String RpmPackageName = System.getenv("RPM_PACKAGE_NAME");
|
||||
+ String RpmArch = System.getenv("RPM_ARCH");
|
||||
+ String RpmBuildRoot = System.getenv("RPM_BUILD_ROOT");
|
||||
+ if (RpmPackageName != null && RpmArch != null && RpmBuildRoot != null) {
|
||||
+ this.options.put(
|
||||
+ CompilerOptions.OPTION_LocalVariableAttribute,
|
||||
+ CompilerOptions.GENERATE);
|
||||
+ this.options.put(
|
||||
+ CompilerOptions.OPTION_LineNumberAttribute,
|
||||
+ CompilerOptions.GENERATE);
|
||||
+ this.options.put(
|
||||
+ CompilerOptions.OPTION_SourceFileAttribute,
|
||||
+ CompilerOptions.GENERATE);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
this.logger.logCommandLineArguments(newCommandLineArgs);
|
||||
this.logger.logOptions(this.options);
|
||||
|
||||
@@ -2636,7 +2659,7 @@
|
||||
0,
|
||||
classCount);
|
||||
}
|
||||
-
|
||||
+
|
||||
setPaths(bootclasspaths,
|
||||
sourcepathClasspathArg,
|
||||
sourcepathClasspaths,
|
||||
@@ -2644,7 +2667,7 @@
|
||||
extdirsClasspaths,
|
||||
endorsedDirClasspaths,
|
||||
customEncoding);
|
||||
-
|
||||
+
|
||||
if (this.pendingErrors != null) {
|
||||
for (Iterator iterator = this.pendingErrors.iterator(); iterator.hasNext(); ) {
|
||||
String message = (String) iterator.next();
|
||||
@@ -3376,7 +3399,7 @@
|
||||
} else if (token.equals("unusedTypeArgs")) { //$NON-NLS-1$
|
||||
this.options.put(
|
||||
CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation,
|
||||
- isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
|
||||
+ isEnabling ? CompilerOptions.WARNING : CompilerOptions.IGNORE);
|
||||
} else {
|
||||
addPendingErrors(this.bind("configure.invalidWarning", token)); //$NON-NLS-1$
|
||||
}
|
4
ecj.sh.in
Normal file
4
ecj.sh.in
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
CLASSPATH=@JAVADIR@/ecj.jar${CLASSPATH:+:}$CLASSPATH \
|
||||
java org.eclipse.jdt.internal.compiler.batch.Main "$@"
|
194
ecj.spec
Normal file
194
ecj.spec
Normal file
@ -0,0 +1,194 @@
|
||||
Epoch: 1
|
||||
|
||||
%define qualifier 200902111700
|
||||
|
||||
%define with_gcjbootstrap %{!?_with_gcjbootstrap:0}%{?_with_gcjbootstrap:1}
|
||||
%define without_gcjbootstrap %{?_with_gcjbootstrap:0}%{!?_with_gcjbootstrap:1}
|
||||
|
||||
Summary: Eclipse Compiler for Java
|
||||
Name: ecj
|
||||
Version: 3.4.2
|
||||
Release: 1%{?dist}
|
||||
URL: http://www.eclipse.org
|
||||
License: EPL
|
||||
Group: Development/Languages
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{qualifier}/%{name}src-%{version}.zip
|
||||
Source1: ecj.sh.in
|
||||
# Use ECJ for GCJ
|
||||
# cvs -d:pserver:anonymous@sourceware.org:/cvs/rhug \
|
||||
# export -r eclipse_r34_1 eclipse-gcj
|
||||
# tar cjf ecj-gcj.tar.bz2 eclipse-gcj
|
||||
Source2: %{name}-gcj.tar.bz2
|
||||
# Always generate debug info when building RPMs (Andrew Haley)
|
||||
Patch0: %{name}-rpmdebuginfo.patch
|
||||
Patch1: %{name}-defaultto1.5.patch
|
||||
|
||||
BuildRequires: gcc-java >= 4.0.0
|
||||
BuildRequires: java-gcj-compat
|
||||
|
||||
%if %{with_gcjbootstrap}
|
||||
BuildRequires: ant
|
||||
%endif
|
||||
|
||||
Requires: libgcj >= 4.0.0
|
||||
Requires(post): java-gcj-compat
|
||||
Requires(postun): java-gcj-compat
|
||||
|
||||
Provides: eclipse-ecj = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: eclipse-ecj < 1:3.4.2-4
|
||||
|
||||
%description
|
||||
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
|
||||
the JDT Core batch compiler.
|
||||
|
||||
%prep
|
||||
%setup -q -c
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
# Use ECJ for GCJ's bytecode compiler
|
||||
tar jxf %{SOURCE2}
|
||||
mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java \
|
||||
org/eclipse/jdt/internal/compiler/batch/
|
||||
cat eclipse-gcj/gcc.properties >> \
|
||||
org/eclipse/jdt/internal/compiler/batch/messages.properties
|
||||
rm -rf eclipse-gcj
|
||||
|
||||
# Remove bits of JDT Core we don't want to build
|
||||
rm -r org/eclipse/jdt/internal/compiler/tool
|
||||
rm -r org/eclipse/jdt/internal/compiler/apt
|
||||
|
||||
# JDTCompilerAdapter isn't used by the batch compiler
|
||||
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
|
||||
|
||||
%build
|
||||
%if %{with_gcjbootstrap}
|
||||
for f in `find -name '*.java' | cut -c 3- | LC_ALL=C sort`; do
|
||||
gcj -Wno-deprecated -C $f
|
||||
done
|
||||
|
||||
find -name '*.class' -or -name '*.properties' -or -name '*.rsc' |\
|
||||
xargs fastjar cf %{name}-%{version}.jar
|
||||
%else
|
||||
ant
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_javadir}
|
||||
cp -a *.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
pushd $RPM_BUILD_ROOT%{_javadir}
|
||||
ln -s %{name}-%{version}.jar %{name}.jar
|
||||
ln -s %{name}-%{version}.jar eclipse-%{name}-%{version}.jar
|
||||
ln -s eclipse-%{name}-%{version}.jar eclipse-%{name}.jar
|
||||
ln -s %{name}-%{version}.jar jdtcore.jar
|
||||
popd
|
||||
|
||||
# Install the ecj wrapper script
|
||||
install -p -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ecj
|
||||
sed --in-place "s:@JAVADIR@:%{_javadir}:" $RPM_BUILD_ROOT%{_bindir}/ecj
|
||||
|
||||
aot-compile-rpm
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||
then
|
||||
%{_bindir}/rebuild-gcj-db
|
||||
fi
|
||||
|
||||
%postun
|
||||
if [ -x %{_bindir}/rebuild-gcj-db ]
|
||||
then
|
||||
%{_bindir}/rebuild-gcj-db
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc about.html
|
||||
%{_bindir}/%{name}
|
||||
%{_javadir}/%{name}*.jar
|
||||
%{_javadir}/eclipse-%{name}*.jar
|
||||
%{_javadir}/jdtcore.jar
|
||||
%{_libdir}/gcj/%{name}
|
||||
|
||||
%changelog
|
||||
* Fri Mar 6 2009 Andrew Overholt <overholt@redhat.com> 1:3.4.2-1
|
||||
- 3.4.2
|
||||
|
||||
* Tue Dec 9 2008 Andrew Overholt <overholt@redhat.com> 1:3.4.1-1
|
||||
- 3.4.1
|
||||
- Don't conditionalize building of gcj AOT bits (we're only building
|
||||
this for gcj and IcedTea bootstrapping).
|
||||
|
||||
* Mon Jan 22 2007 Andrew Overholt <overholt@redhat.com> 3.2.1-1
|
||||
- Add eclipse-ecj-gcj.patch.
|
||||
|
||||
* Fri Jan 12 2007 Andrew Overholt <overholt@redhat.com> 3.2.1-1
|
||||
- First version for Fedora 7.
|
||||
- Add BR: java-devel for jar.
|
||||
|
||||
* Thu Nov 02 2006 Andrew Overholt <overholt@redhat.com> 1:3.2.1-1jpp
|
||||
- First version for JPackage.
|
||||
|
||||
* Mon Jul 24 2006 Andrew Overholt <overholt@redhat.com> 1:3.2.0-1
|
||||
- Add versionless ecj.jar symlink in /usr/share/java.
|
||||
|
||||
* Wed Jul 19 2006 Andrew Overholt <overholt@redhat.com> 1:3.2.0-1
|
||||
- 3.2.0.
|
||||
|
||||
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
|
||||
- rebuilt
|
||||
|
||||
* Mon Mar 07 2005 Andrew Overholt <overholt@redhat.com> 1:3.1.0.M4.9
|
||||
- Don't build for ppc or ia64.
|
||||
|
||||
* Sun Feb 20 2005 Andrew Overholt <overholt@redhat.com> 1:3.1.0.M4.6
|
||||
- Upgrade back to 3.1M4.
|
||||
- Don't build for i386 and x86_64.
|
||||
- Provide eclipse-ecj until we can deprecate this package.
|
||||
|
||||
* Fri Jan 14 2005 Andrew Overholt <overholt@redhat.com> 3.1.0.M4.4
|
||||
- build for all but x86
|
||||
|
||||
* Thu Jan 13 2005 Andrew Overholt <overholt@redhat.com> 3.1.0.M4.3
|
||||
- build for ppc exclusively
|
||||
|
||||
* Wed Jan 12 2005 Andrew Overholt <overholt@redhat.com> 3.1.0.M4.2
|
||||
- Add RPM_OPT_FLAGS workaround.
|
||||
|
||||
* Tue Jan 11 2005 Andrew Overholt <overholt@redhat.com> 3.1.0.M4.1
|
||||
- New version.
|
||||
|
||||
* Mon Sep 27 2004 Gary Benson <gbenson@redhat.com> 2.1.3-5
|
||||
- Rebuild with new katana.
|
||||
|
||||
* Fri Jul 22 2004 Gary Benson <gbenson@redhat.com> 2.1.3-4
|
||||
- Build without bootstrap-ant.
|
||||
- Split out lib-org-eclipse-jdt-internal-compiler.so.
|
||||
|
||||
* Tue Jul 6 2004 Gary Benson <gbenson@redhat.com> 2.1.3-3
|
||||
- Fix ecj-devel's dependencies.
|
||||
|
||||
* Wed Jun 9 2004 Gary Benson <gbenson@redhat.com> 2.1.3-2
|
||||
- Work around an optimiser failure somewhere in ecj or gcj (#125613).
|
||||
|
||||
* Fri May 28 2004 Gary Benson <gbenson@redhat.com>
|
||||
- Build with katana.
|
||||
|
||||
* Mon May 24 2004 Gary Benson <gbenson@redhat.com> 2.1.3-1
|
||||
- Initial Red Hat Linux build.
|
||||
|
||||
* Mon May 24 2004 Gary Benson <gbenson@redhat.com>
|
||||
- Upgraded to latest version.
|
||||
|
||||
* Sun Jul 20 2003 Anthony Green <green@redhat.com>
|
||||
- Add %%doc
|
||||
|
||||
* Fri Jul 18 2003 Anthony Green <green@redhat.com>
|
||||
- Initial RHUG build.
|
Loading…
Reference in New Issue
Block a user