changeset 1462:7fbf1ecbc41d

2008-12-02 Matthias Klose <doko@ubuntu.com> * patches/icedtea-format-warnings.patch: New. * patches/icedtea-format-warnings.patch: Likewise. * HACKING: Document patches. * Makefile.am: Apply patches. 2008-12-02 Matthias Klose <doko@ubuntu.com> * Makefile.am (stamps/extract.stamp): Handle tar archives. * Makefile.am (stamps/pulse-java.stamp): Add missing include directives.
author doko@ubuntu.com
date Tue, 02 Dec 2008 18:24:55 +0100
parents d8e977068163
children 9cac71fc9e47 d0505857d8da
files ChangeLog HACKING Makefile.am patches/icedtea-format-warnings.patch patches/icedtea-fortify-source.patch
diffstat 5 files changed, 116 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Nov 21 10:29:58 2008 +0000
+++ b/ChangeLog	Tue Dec 02 18:24:55 2008 +0100
@@ -1,3 +1,16 @@
+2008-12-02  Matthias Klose  <doko@ubuntu.com>
+
+	* patches/icedtea-format-warnings.patch: New.
+	* patches/icedtea-format-warnings.patch: Likewise.
+	* HACKING: Document patches.
+	* Makefile.am: Apply patches.
+
+2008-12-02  Matthias Klose  <doko@ubuntu.com>
+
+	* Makefile.am (stamps/extract.stamp): Handle tar archives.
+	* Makefile.am (stamps/pulse-java.stamp): Add missing include
+	directives.
+
 2008-11-21  Andrew John Hughes  <ahughes@redhat.com>
 
 	* Makefile.am:
--- a/HACKING	Fri Nov 21 10:29:58 2008 +0000
+++ b/HACKING	Tue Dec 02 18:24:55 2008 +0100
@@ -96,6 +96,8 @@
   javax.management.AttributeValueExp (unsupported by ecj < 3.4).
 * icedtea-snmp.patch: Remove proprietary SNMP support hooks.
 * icedtea-sound.patch: Remove proprietary MIDI support hooks.
+* icedtea-fortify-source.patch: Fix build failures with -D_FORTIFY_SOURCE=2.
+* icedtea-format-warnings.patch: Fix build failures with -Wformat=1.
 
 The following patches are only applied to the icedtea-ecj bootstrap tree:
 
--- a/Makefile.am	Fri Nov 21 10:29:58 2008 +0000
+++ b/Makefile.am	Tue Dec 02 18:24:55 2008 +0100
@@ -1849,6 +1849,8 @@
 	patches/icedtea-6761856-freetypescaler.patch \
 	patches/icedtea-display-mode-changer.patch \
 	patches/icedtea-testenv.patch \
+	patches/icedtea-format-warnings.patch \
+	patches/icedtea-fortify-source.patch \
 	$(ZERO_PATCHES_COND)
 
 if WITH_RHINO
@@ -1882,7 +1884,10 @@
 else
 	if ! test -d openjdk ; then \
 	  if [ ! -z $(OPENJDK_SRC_ZIP) ] ; then \
-	    $(UNZIP) -q $(OPENJDK_SRC_ZIP) ; \
+	    case "$(OPENJDK_SRC_ZIP)" in \
+	      *.zip) $(UNZIP) -q $(OPENJDK_SRC_ZIP) ;; \
+	      *.tar.*) $(TAR) xf $(OPENJDK_SRC_ZIP) ;; \
+	    esac; \
 	  else \
 	    echo "ERROR: Couldn't extract OpenJDK"; \
 	    false; \
@@ -2800,11 +2805,11 @@
 stamps/pulse-java.stamp: stamps/pulse-java-jar.stamp stamps/pulse-java-headers.stamp
 if ENABLE_PULSE_JAVA
 	$(CC) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/jni-common.c
-	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c
-	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c
-	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c
-	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c 
-	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c
+	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(builddir)/pulseaudio $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_EventLoop.c
+	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(builddir)/pulseaudio $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Operation.c
+	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(builddir)/pulseaudio $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_Stream.c
+	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(builddir)/pulseaudio $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c 
+	$(CC) $(LIBPULSE_CFLAGS) $(CFLAGS) -fPIC -c -I$(ICEDTEA_BOOT_DIR)/include/linux -I$(ICEDTEA_BOOT_DIR)/include -I$(builddir)/pulseaudio $(PULSE_JAVA_NATIVE_SRCDIR)/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c
 	$(CC) $(LDFLAGS) -shared org_*pulseaudio*.o jni-common.o $(LIBPULSE_LIBS) -o libpulse-java.so 
 	mv org_classpath_icedtea_pulseaudio_*.o $(PULSE_JAVA_CLASS_DIR)
 	mv jni-common.o $(PULSE_JAVA_CLASS_DIR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-format-warnings.patch	Tue Dec 02 18:24:55 2008 +0100
@@ -0,0 +1,30 @@
+--- openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp~	2008-11-20 09:41:03.000000000 +0100
++++ openjdk/hotspot/src/share/vm/classfile/javaClasses.cpp	2008-12-02 16:47:01.000000000 +0100
+@@ -866,7 +866,7 @@
+     }
+     nmethod* nm = method->code();
+     if (WizardMode && nm != NULL) {
+-      sprintf(buf + (int)strlen(buf), "(nmethod %#x)", nm);
++      sprintf(buf + (int)strlen(buf), "(nmethod %p)", nm);
+     }
+   }
+ 
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp~	2008-12-02 16:38:27.000000000 +0100
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2008-12-02 17:05:17.000000000 +0100
+@@ -4133,6 +4133,7 @@
+   int count;
+   long sys_time, user_time;
+   char string[64];
++  char cdummy;
+   int idummy;
+   long ldummy;
+   FILE *fp;
+@@ -4194,7 +4195,7 @@
+   do s++; while (isspace(*s));
+ 
+   count = sscanf(s,"%c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu",
+-                 &idummy, &idummy, &idummy, &idummy, &idummy, &idummy,
++                 &cdummy, &idummy, &idummy, &idummy, &idummy, &idummy,
+                  &ldummy, &ldummy, &ldummy, &ldummy, &ldummy,
+                  &user_time, &sys_time);
+   if ( count != 13 ) return -1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-fortify-source.patch	Tue Dec 02 18:24:55 2008 +0100
@@ -0,0 +1,60 @@
+--- openjdk/hotspot/src/share/vm/prims/jvm.cpp~	2008-11-20 09:41:05.000000000 +0100
++++ openjdk/hotspot/src/share/vm/prims/jvm.cpp	2008-12-02 16:55:32.000000000 +0100
+@@ -2474,7 +2474,7 @@
+   if (Arguments::vfprintf_hook() != NULL) {
+     jio_fprintf(defaultStream::output_stream(), "%s", s);
+   } else {
+-    ::write(defaultStream::output_fd(), s, (int)strlen(s));
++    ssize_t rv = ::write(defaultStream::output_fd(), s, (int)strlen(s));
+   }
+ }
+ 
+--- openjdk/hotspot/src/share/vm/utilities/ostream.cpp~	2008-12-02 16:38:32.000000000 +0100
++++ openjdk/hotspot/src/share/vm/utilities/ostream.cpp	2008-12-02 16:58:26.000000000 +0100
+@@ -300,7 +300,7 @@
+ }
+ 
+ void fileStream::write(const char* s, size_t len) {
+-  if (_file != NULL)  fwrite(s, 1, len, _file);
++  if (_file != NULL)  size_t rv = fwrite(s, 1, len, _file);
+   update_position(s, len);
+ }
+ 
+@@ -328,7 +328,7 @@
+ }
+ 
+ void fdStream::write(const char* s, size_t len) {
+-  if (_fd != -1) ::write(_fd, s, (int)len);
++  if (_fd != -1)  ssize_t rv = ::write(_fd, s, (int)len);
+   update_position(s, len);
+ }
+ 
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp~	2008-12-02 16:38:27.000000000 +0100
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2008-12-02 17:05:17.000000000 +0100
+@@ -2066,7 +2066,7 @@
+                 CAST_FROM_FN_PTR(address, os::jvm_path),
+                 dli_fname, sizeof(dli_fname), NULL);
+   assert(ret != 0, "cannot locate libjvm");
+-  realpath(dli_fname, buf);
++  char *rv = realpath(dli_fname, buf);
+ 
+   if (strcmp(Arguments::sun_java_launcher(), "gamma") == 0) {
+     // Support for the gamma launcher.  Typical value for buf is
+@@ -2090,7 +2090,7 @@
+         assert(strstr(p, "/libjvm") == p, "invalid library name");
+         p = strstr(p, "_g") ? "_g" : "";
+ 
+-        realpath(java_home_var, buf);
++        char *rv = realpath(java_home_var, buf);
+         sprintf(buf + strlen(buf), "/jre/lib/%s", cpu_arch);
+         if (0 == access(buf, F_OK)) {
+           // Use current module name "libjvm[_g].so" instead of
+@@ -2101,7 +2101,7 @@
+           sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p);
+         } else {
+           // Go back to path of .so
+-          realpath(dli_fname, buf);
++          rv = realpath(dli_fname, buf);
+         }
+       }
+     }