From 4499d99538d6b5572669686e44fdf005ccaca3bd Mon Sep 17 00:00:00 2001 From: Jon VanAlten Date: Mon, 19 Nov 2012 20:08:38 -0500 Subject: [PATCH] Patch GCCMain to avoid dummy symbols. --- ecj.spec | 7 ++++++- eclipse-gcj-nodummysymbol.patch | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 eclipse-gcj-nodummysymbol.patch diff --git a/ecj.spec b/ecj.spec index b59c7e8..e4bbf9e 100644 --- a/ecj.spec +++ b/ecj.spec @@ -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 1:4.2.1-3 +- Patch GCCMain to avoid dummy symbols. + * Wed Oct 10 2012 Krzysztof Daniel 1:4.2.1-2 - Add depmap satysfying Tycho req. diff --git a/eclipse-gcj-nodummysymbol.patch b/eclipse-gcj-nodummysymbol.patch new file mode 100644 index 0000000..fe84050 --- /dev/null +++ b/eclipse-gcj-nodummysymbol.patch @@ -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; + }