[java-1.7.0-openjdk/f16] - Added patch to fix bug in jdk_generic_profile.sh - Compile with generic profile to use system libr
Deepak Bhole
dbhole at fedoraproject.org
Tue Nov 15 23:22:52 UTC 2011
commit 01fe5374c09d75701f263fcb17f31b8a29fdb66c
Author: Deepak Bhole <dbhole at redhat.com>
Date: Tue Nov 15 18:22:38 2011 -0500
- Added patch to fix bug in jdk_generic_profile.sh
- Compile with generic profile to use system libraries
- Made remove-intree-libraries.sh more robust
- Added lcms requirement
- Added patch to fix glibc name clash
- Updated java version to include -icedtea
java-1.7.0-openjdk-glibc-name-clash.patch | 236 +++++++++++++++++++++++++++++
java-1.7.0-openjdk.spec | 46 +++++-
remove-intree-libraries.sh | 34 ++++-
3 files changed, 302 insertions(+), 14 deletions(-)
---
diff --git a/java-1.7.0-openjdk-glibc-name-clash.patch b/java-1.7.0-openjdk-glibc-name-clash.patch
new file mode 100644
index 0000000..50cd495
--- /dev/null
+++ b/java-1.7.0-openjdk-glibc-name-clash.patch
@@ -0,0 +1,236 @@
+# HG changeset patch
+# User never
+# Date 1319555835 25200
+# Node ID a6eef545f1a2ceca6aeadf688a965df600ffef28
+# Parent 2ec638646e86e455978c31a9d47fc0ec271ed926
+7103224: collision between __LEAF define in interfaceSupport.hpp and /usr/include/sys/cdefs.h with gcc
+Reviewed-by: never
+Contributed-by: Omair Majid <omajid at redhat.com>
+
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/opto/addnode.cpp
+--- openjdk/hotspot/src/share/vm/opto/addnode.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/opto/addnode.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -34,8 +34,6 @@
+
+ // Portions of code courtesy of Clifford Click
+
+-#define MAXFLOAT ((float)3.40282346638528860e+38)
+-
+ // Classic Add functionality. This covers all the usual 'add' behaviors for
+ // an algebraic ring. Add-integer, add-float, add-double, and binary-or are
+ // all inherited from this class. The various identity values are supplied
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jniCheck.cpp
+--- openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jniCheck.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -107,7 +107,7 @@
+ if (env != xenv) { \
+ NativeReportJNIFatalError(thr, warn_wrong_jnienv); \
+ } \
+- __ENTRY(result_type, header, thr)
++ VM_ENTRY_BASE(result_type, header, thr)
+
+
+ #define UNCHECKED() (unchecked_jni_NativeInterface)
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jvmtiEnter.xsl
+--- openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnter.xsl Tue Oct 25 08:17:15 2011 -0700
+@@ -426,7 +426,7 @@
+ <xsl:value-of select="$space"/>
+ <xsl:text>ThreadInVMfromNative __tiv(current_thread);</xsl:text>
+ <xsl:value-of select="$space"/>
+- <xsl:text>__ENTRY(jvmtiError, </xsl:text>
++ <xsl:text>VM_ENTRY_BASE(jvmtiError, </xsl:text>
+ <xsl:apply-templates select="." mode="functionid"/>
+ <xsl:text> , current_thread)</xsl:text>
+ <xsl:value-of select="$space"/>
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jvmtiEnv.cpp
+--- openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiEnv.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -173,7 +173,7 @@
+ // from native so as to resolve the jthread.
+
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
++ VM_ENTRY_BASE(jvmtiError, JvmtiEnv::GetThreadLocalStorage , current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ oop thread_oop = JNIHandles::resolve_external_guard(thread);
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/prims/jvmtiExport.cpp
+--- openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp Tue Oct 25 08:17:15 2011 -0700
+@@ -373,7 +373,7 @@
+ JavaThread* current_thread = (JavaThread*) ThreadLocalStorage::thread();
+ // transition code: native to VM
+ ThreadInVMfromNative __tiv(current_thread);
+- __ENTRY(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
++ VM_ENTRY_BASE(jvmtiEnv*, JvmtiExport::get_jvmti_interface, current_thread)
+ debug_only(VMNativeEntryWrapper __vew;)
+
+ JvmtiEnv *jvmti_env = JvmtiEnv::create_a_jvmti(version);
+diff -r 2ec638646e86 -r a6eef545f1a2 src/share/vm/runtime/interfaceSupport.hpp
+--- openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 04:07:20 2011 -0700
++++ openjdk/hotspot/src/share/vm/runtime/interfaceSupport.hpp Tue Oct 25 08:17:15 2011 -0700
+@@ -72,9 +72,9 @@
+ }
+ };
+
+-// InterfaceSupport provides functionality used by the __LEAF and __ENTRY
+-// macros. These macros are used to guard entry points into the VM and
+-// perform checks upon leave of the VM.
++// InterfaceSupport provides functionality used by the VM_LEAF_BASE and
++// VM_ENTRY_BASE macros. These macros are used to guard entry points into
++// the VM and perform checks upon leave of the VM.
+
+
+ class InterfaceSupport: AllStatic {
+@@ -433,7 +433,7 @@
+
+ // LEAF routines do not lock, GC or throw exceptions
+
+-#define __LEAF(result_type, header) \
++#define VM_LEAF_BASE(result_type, header) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ /* begin of body */
+@@ -441,7 +441,7 @@
+
+ // ENTRY routines may lock, GC and throw exceptions
+
+-#define __ENTRY(result_type, header, thread) \
++#define VM_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ HandleMarkCleaner __hm(thread); \
+ Thread* THREAD = thread; \
+@@ -450,7 +450,7 @@
+
+ // QUICK_ENTRY routines behave like ENTRY but without a handle mark
+
+-#define __QUICK_ENTRY(result_type, header, thread) \
++#define VM_QUICK_ENTRY_BASE(result_type, header, thread) \
+ TRACE_CALL(result_type, header) \
+ debug_only(NoHandleMark __hm;) \
+ Thread* THREAD = thread; \
+@@ -463,20 +463,20 @@
+ #define IRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define IRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(No_Safepoint_Verifier __nspv(true);)
+
+
+ #define IRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Another special case for nmethod_entry_point so the nmethod that the
+@@ -487,7 +487,7 @@
+ result_type header { \
+ nmethodLocker _nmlock(nm); \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+ #define IRT_END }
+
+@@ -497,20 +497,20 @@
+ #define JRT_ENTRY(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJava __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+
+ #define JRT_LEAF(result_type, header) \
+ result_type header { \
+- __LEAF(result_type, header) \
++ VM_LEAF_BASE(result_type, header) \
+ debug_only(JRT_Leaf_Verifier __jlv;)
+
+
+ #define JRT_ENTRY_NO_ASYNC(result_type, header) \
+ result_type header { \
+ ThreadInVMfromJavaNoAsyncException __tiv(thread); \
+- __ENTRY(result_type, header, thread) \
++ VM_ENTRY_BASE(result_type, header, thread) \
+ debug_only(VMEntryWrapper __vew;)
+
+ // Same as JRT Entry but allows for return value after the safepoint
+@@ -543,11 +543,11 @@
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ // Ensure that the VMNativeEntryWrapper constructor, which can cause
+-// a GC, is called outside the NoHandleMark (set via __QUICK_ENTRY).
++// a GC, is called outside the NoHandleMark (set via VM_QUICK_ENTRY_BASE).
+ #define JNI_QUICK_ENTRY(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+@@ -555,7 +555,7 @@
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JNI_LEAF(result_type, header) \
+@@ -563,7 +563,7 @@
+ result_type JNICALL header { \
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ assert( !VerifyJNIEnvThread || (thread == Thread::current()), "JNIEnv is only valid in same thread"); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ // Close the routine and the extern "C"
+@@ -579,7 +579,7 @@
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_ENTRY_NO_ENV(result_type, header) \
+@@ -588,7 +588,7 @@
+ JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __ENTRY(result_type, header, thread)
++ VM_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_QUICK_ENTRY(result_type, header) \
+@@ -597,14 +597,14 @@
+ JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
+ ThreadInVMfromNative __tiv(thread); \
+ debug_only(VMNativeEntryWrapper __vew;) \
+- __QUICK_ENTRY(result_type, header, thread)
++ VM_QUICK_ENTRY_BASE(result_type, header, thread)
+
+
+ #define JVM_LEAF(result_type, header) \
+ extern "C" { \
+ result_type JNICALL header { \
+ VM_Exit::block_if_vm_exited(); \
+- __LEAF(result_type, header)
++ VM_LEAF_BASE(result_type, header)
+
+
+ #define JVM_END } }
diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index e1a911f..e017629 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -151,7 +151,7 @@
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{buildver}
-Release: %{icedtea_version}.2%{?dist}
+Release: %{icedtea_version}.3%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@@ -236,8 +236,16 @@ Patch4: java-1.7.0-openjdk-accessible-toolkit.patch
# Build docs even in debug
Patch5: java-1.7.0-openjdk-debugdocs.patch
+
+# Add debuginfo where missing
Patch6: %{name}-debuginfo.patch
+# Fix bug in jdk_generic_profile.sh
+Patch7: %{name}-system-zlib.patch
+
+# Patch to fix glibc name clash
+Patch8: %{name}-glibc-name-clash.patch
+
#
# OpenJDK specific patches
#
@@ -379,6 +387,7 @@ BuildRequires: alsa-lib-devel
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
BuildRequires: giflib-devel
+BuildRequires: lcms2-devel
BuildRequires: libX11-devel
BuildRequires: libXi-devel
BuildRequires: libXp-devel
@@ -438,6 +447,7 @@ BuildRequires: systemtap-sdt-devel
BuildRequires: jakarta-commons-logging
Requires: rhino
+Requires: lcms2
Requires: libjpeg = 6b
# Require /etc/pki/java/cacerts.
Requires: ca-certificates
@@ -659,6 +669,12 @@ patch -l -p0 < %{PATCH5}
patch -l -p0 < %{PATCH6}
%endif
+patch -l -p0 < %{PATCH7}
+patch -l -p0 < %{PATCH8}
+
+# Add a "-icedtea" tag to the version
+sed -i "s#BUILD_VARIANT_RELEASE)#BUILD_VARIANT_RELEASE)-icedtea#" openjdk/jdk/make/common/shared/Defs.gmk
+
# Build the re-written rhino jar
mkdir -p rhino/{old,new}
@@ -746,9 +762,13 @@ pushd openjdk-boot
cp -a ../generated generated.build
chmod u+rwx generated.build
+export ALT_DROPS_DIR=$PWD/../drops
+export ALT_JDK_IMPORT_PATH="$PWD/../bootstrap/jdk1.6.0"
+
+# Set generic profile
+source jdk/make/jdk_generic_profile.sh
+
make \
- ALT_DROPS_DIR=$PWD/../drops \
- ALT_JDK_IMPORT_PATH="$PWD/../bootstrap/jdk1.6.0" \
ANT="/usr/bin/ant" \
ALT_BOOTDIR="$PWD/../bootstrap/jdk1.6.0" \
ICEDTEA_RT="$PWD/../bootstrap/jdk1.6.0/jre/lib/rt.jar" \
@@ -773,9 +793,13 @@ export JDK_TO_BUILD_WITH=/usr/lib/jvm/java-openjdk
pushd openjdk >& /dev/null
+export ALT_DROPS_DIR=$PWD/../drops
+export ALT_BOOTDIR="$JDK_TO_BUILD_WITH"
+
+# Set generic profile
+source jdk/make/jdk_generic_profile.sh
+
make \
- ALT_DROPS_DIR=$PWD/../drops \
- ALT_BOOTDIR="$JDK_TO_BUILD_WITH" \
ANT="/usr/bin/ant" \
DISTRO_NAME="Fedora" \
DISTRO_PACKAGE_VERSION="fedora-%{release}-%{_arch}" \
@@ -787,10 +811,6 @@ make \
GENSRCDIR="$PWD/generated.build" \
FT2_CFLAGS="-I/usr/include/freetype2 " \
FT2_LIBS="-lfreetype " \
- USE_SYSTEM_JPEG="true" \
- JPEG_LIBS="-ljpeg" \
- JPEG_CFLAGS="" \
- DEBUG_CLASSFILES="true" \
DEBUG_BINARIES="true" \
%{debugbuild}
@@ -1310,6 +1330,14 @@ exit 0
%doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
%changelog
+* Tue Nov 15 2011 Deepak Bhole <dbhole at redhat.com> - 1.7.0.1-2.0.3
+- Added patch to fix bug in jdk_generic_profile.sh
+- Compile with generic profile to use system libraries
+- Made remove-intree-libraries.sh more robust
+- Added lcms requirement
+- Added patch to fix glibc name clash
+- Updated java version to include -icedtea
+
* Sun Nov 06 2011 Deepak Bhole <dbhole at redhat.com> - 1.7.0.1-2.0.2
- Added missing changelog entry
diff --git a/remove-intree-libraries.sh b/remove-intree-libraries.sh
index 1fb918d..da15d9e 100644
--- a/remove-intree-libraries.sh
+++ b/remove-intree-libraries.sh
@@ -1,16 +1,26 @@
#!/bin/sh
-ZIP_SRC=jdk/src/share/native/java/util/zip/zlib-*
-JPEG_SRC=jdk/src/share/native/sun/awt/image/jpeg
-GIF_SRC=jdk/src/share/native/sun/awt/giflib
-PNG_SRC=jdk/src/share/native/sun/awt/libpng
-LCMS_SRC=jdk/src/share/native/sun/java2d/cmm/lcms
+ZIP_SRC=openjdk/jdk/src/share/native/java/util/zip/zlib-*
+JPEG_SRC=openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpeg-6b
+GIF_SRC=openjdk/jdk/src/share/native/sun/awt/giflib
+PNG_SRC=openjdk/jdk/src/share/native/sun/awt/libpng
+LCMS_SRC=openjdk/jdk/src/share/native/sun/java2d/cmm/lcms
echo "Removing built-in libs (they will be linked)"
echo "Removing zlib"
+if [ ! -d ${ZIP_SRC} ]; then
+ echo "${ZIP_SRC} does not exist. Refusing to proceed."
+ exit 1
+fi
rm -rvf ${ZIP_SRC}
+
echo "Removing libjpeg"
+if [ ! -f ${JPEG_SRC}/jdhuff.c ]; then # some file that sound definitely exist
+ echo "${JPEG_SRC} does not contain jpeg sources. Refusing to proceed."
+ exit 1
+fi
+
rm -vf ${JPEG_SRC}/jcomapi.c
rm -vf ${JPEG_SRC}/jdapimin.c
rm -vf ${JPEG_SRC}/jdapistd.c
@@ -56,12 +66,26 @@ rm -vf ${JPEG_SRC}/jfdctflt.c
rm -vf ${JPEG_SRC}/jfdctfst.c
rm -vf ${JPEG_SRC}/jfdctint.c
rm -vf ${JPEG_SRC}/README
+
echo "Removing giflib"
+if [ ! -d ${GIF_SRC} ]; then
+ echo "${GIF_SRC} does not exist. Refusing to proceed."
+ exit 1
+fi
rm -rvf ${GIF_SRC}
+
echo "Removing libpng"
+if [ ! -d ${PNG_SRC} ]; then
+ echo "${PNG_SRC} does not exist. Refusing to proceed."
+ exit 1
+fi
rm -rvf ${PNG_SRC}
echo "Removing lcms"
+if [ ! -d ${LCMS_SRC} ]; then
+ echo "${LCMS_SRC} does not exist. Refusing to proceed."
+ exit 1
+fi
rm -vf ${LCMS_SRC}/cmscam02.c
rm -vf ${LCMS_SRC}/cmscgats.c
rm -vf ${LCMS_SRC}/cmscnvrt.c
More information about the scm-commits
mailing list