Patch GCCMain to avoid dummy symbols.

This commit is contained in:
Jon VanAlten 2012-11-19 20:08:38 -05:00
parent 330c67a4b6
commit 4499d99538
2 changed files with 43 additions and 1 deletions

View File

@ -8,7 +8,7 @@ Epoch: 1
Summary: Eclipse Compiler for Java
Name: ecj
Version: 4.2.1
Release: 2%{?dist}
Release: 3%{?dist}
URL: http://www.eclipse.org
License: EPL
Group: Development/Languages
@ -30,6 +30,7 @@ Patch2: %{name}-generatedebuginfo.patch
Patch3: eclipse-gcj-compat4.2.1.patch
# build.xml fails to include a necessary .props file in the built ecj.jar
Patch4: %{name}-include-props.patch
Patch5: eclipse-gcj-nodummysymbol.patch
BuildRequires: gcc-java >= 4.0.0
BuildRequires: /usr/bin/aot-compile-rpm
@ -71,6 +72,7 @@ tar jxf %{SOURCE2}
mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java \
org/eclipse/jdt/internal/compiler/batch/
%patch3 -p1
%patch5 -p1
cat eclipse-gcj/gcc.properties >> \
org/eclipse/jdt/internal/compiler/batch/messages.properties
rm -rf eclipse-gcj
@ -141,6 +143,9 @@ fi
%{_libdir}/gcj/%{name}
%changelog
* Mon Oct 29 2012 Jon VanAlten <jon.vanalten@redhat.com> 1:4.2.1-3
- Patch GCCMain to avoid dummy symbols.
* Wed Oct 10 2012 Krzysztof Daniel <kdaniel@redhat.com> 1:4.2.1-2
- Add depmap satysfying Tycho req.

View File

@ -0,0 +1,37 @@
diff -u -r org/eclipse/jdt/internal/compiler/batch/GCCMain.java org/eclipse/jdt/internal/compiler/batch/GCCMain.java
--- a/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2012-10-29 21:12:37.244254740 -0400
+++ b/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2012-10-29 21:13:55.661107108 -0400
@@ -101,16 +101,6 @@
}
zipStream = new ZipOutputStream(new BufferedOutputStream(os));
zipStream.setMethod(ZipOutputStream.STORED);
- // Sun/OpenJDK require at least one entry in the zip file.
- ZipEntry entry = new ZipEntry(".dummy");
- byte[] contents = new byte[0];
- CRC32 crc = new CRC32();
- crc.update(contents);
- entry.setSize(contents.length);
- entry.setCrc(crc.getValue());
- zipStream.putNextEntry(entry);
- zipStream.write(contents);
- zipStream.closeEntry();
}
return zipStream;
}
@@ -120,16 +110,6 @@
OutputStream os = new FileOutputStream(zipDependencyDestination);
zipDependencyStream = new ZipOutputStream(new BufferedOutputStream(os));
zipDependencyStream.setMethod(ZipOutputStream.STORED);
- // Sun/OpenJDK require at least one entry in the zip file.
- ZipEntry entry = new ZipEntry(".dummy");
- byte[] contents = new byte[0];
- CRC32 crc = new CRC32();
- crc.update(contents);
- entry.setSize(contents.length);
- entry.setCrc(crc.getValue());
- zipDependencyStream.putNextEntry(entry);
- zipDependencyStream.write(contents);
- zipDependencyStream.closeEntry();
}
return zipDependencyStream;
}