[ecj/f18] Patch GCCMain to avoid dummy symbols.

Jon VanAlten jvanalte at fedoraproject.org
Tue Dec 11 15:54:17 UTC 2012


commit 83a2f2c2eb8e3e03aee56de93b9d7e5fa586c9b2
Author: Jon VanAlten <jon.vanalten at redhat.com>
Date:   Mon Nov 19 20:08:38 2012 -0500

    Patch GCCMain to avoid dummy symbols.

 ecj.spec                        |    7 ++++++-
 eclipse-gcj-nodummysymbol.patch |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/ecj.spec b/ecj.spec
index 0f2309e..437532b 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: 3%{?dist}
+Release: 4%{?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
+* Tue Dec 11 2012 Jon VanAlten <jon.vanalten at redhat.com> 1:4.2.1-4
+- Patch GCCMain to avoid dummy symbols.
+
 * Fri Nov 2 2012 Krzysztof Daniel <kdaniel at redhat.com> 1:4.2.1-3
 - 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;
+ 	}


More information about the scm-commits mailing list