[ecj/f17] Patch GCCMain to avoid dummy symbols.
Jon VanAlten
jvanalte at fedoraproject.org
Mon Jan 14 23:32:17 UTC 2013
commit 4a5b0d294295d894f8dab3cfaa5a7045357fc53b
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 8e6bcc3..cab7aee 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: 1%{?dist}
+Release: 2%{?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 Jan 14 2013 Jon VanAlten <jon.vanalten at redhat.com> 1:4.2.1-2
+- Patch GCCMain to avoid dummy symbols.
+
* Wed Oct 10 2012 Jon VanAlten <jon.vanalten at redhat.com> 1:4.2.1-1
- Update to 4.2.1 upstream version.
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