[packages/icedtea7] - added x32 support, unfortunately only zero vm (slow) can be used now

baggins baggins at pld-linux.org
Fri Jan 2 15:10:17 CET 2015


commit ef4429ab8436c14029ee33e4b3f4c6823c7b8ca8
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Jan 2 14:09:33 2015 +0000

    - added x32 support, unfortunately only zero vm (slow) can be used now

 icedtea7-x32-ac.patch |  41 ++++++++++++++++++
 icedtea7-x32.patch    | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++
 icedtea7.spec         |  27 ++++++++++--
 3 files changed, 182 insertions(+), 3 deletions(-)
---
diff --git a/icedtea7.spec b/icedtea7.spec
index aed303b..bae99f4 100644
--- a/icedtea7.spec
+++ b/icedtea7.spec
@@ -50,11 +50,14 @@ Source7:	http://icedtea.wildebeest.org/download/drops/icedtea7/%{version}/hotspo
 # Source7-md5:	e58128728b81b99bf94d9cac39015975
 Source10:	make-cacerts.sh
 # 0-99 patches for the IcedTea files
+Patch0:		%{name}-x32-ac.patch
 # 100-... patches applied to the extracted sources
 Patch100:	%{name}-libpath.patch
 Patch101:	%{name}-giflib.patch
 Patch102:	icedtea7-bug-2123.patch
 Patch103:	icedtea7-bug-2135.patch
+Patch104:	%{name}-x32.patch
+Patch105:	currency-change-fix.patch
 URL:		http://icedtea.classpath.org/wiki/Main_Page
 BuildRequires:	alsa-lib-devel
 BuildRequires:	ant
@@ -133,9 +136,13 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %ifarch %{x8664}
 %define		jre_arch	amd64
-%else
+%endif
+%ifarch %{ix86}
 %define		jre_arch	i386
 %endif
+%ifarch x32
+%define		jre_arch	x32
+%endif
 
 # to break artificial subpackage dependency loops
 %define		_noautoreq	'libmawt.so' java\\\\(ClassDataVersion\\\\)
@@ -406,6 +413,7 @@ Przykłady dla OpenJDK.
 
 %prep
 %setup -qn icedtea-%{version}
+%patch0 -p1
 
 # patches to applied to the extracted sources
 install -d pld-patches
@@ -413,6 +421,10 @@ cp -p %{PATCH100} pld-patches
 cp -p %{PATCH101} pld-patches
 cp -p %{PATCH102} pld-patches
 cp -p %{PATCH103} pld-patches
+cp -p %{PATCH104} pld-patches
+%ifarch x32
+cp -p %{PATCH105} pld-patches
+%endif
 
 # let the build system extract the sources where it wants them
 install -d drops
@@ -433,7 +445,7 @@ fi
 
 unset JAVA_HOME
 
-mkdir build-bin
+mkdir -p build-bin
 export PATH="$(pwd)/build-bin:$PATH"
 
 # our /usr/bin/ant is quite broken and won't run properly
@@ -458,6 +470,9 @@ chmod a+x build-bin/ant
 # http://icedtea.classpath.org/wiki/CommonIssues#IcedTea7_building_on_systems_with_JDK_5_or_JDK_6
 %configure \
 	WGET=%{_bindir}/wget \
+%ifarch x32
+	--enable-zero \
+%endif
 	--disable-downloading \
 	--with-jdk-home=%{java_home} \
 	--with-abs-install-dir=%{dstdir} \
@@ -684,7 +699,9 @@ rm -rf $RPM_BUILD_ROOT
 %{dstdir}/lib/jconsole.jar
 %attr(755,root,root) %{dstdir}/lib/jexec
 %{dstdir}/lib/orb.idl
+%ifnarch x32
 %{dstdir}/lib/sa-jdi.jar
+%endif
 %{dstdir}/lib/tools.jar
 %dir %{dstdir}/lib/%{jre_arch}
 %dir %{dstdir}/lib/%{jre_arch}/jli
@@ -756,7 +773,7 @@ rm -rf $RPM_BUILD_ROOT
 %{jredir}/lib/cmm
 %{jredir}/lib/ext
 %dir %{jredir}/lib/%{jre_arch}
-%ifnarch %{x8664}
+%ifnarch %{x8664} x32
 %dir %{jredir}/lib/%{jre_arch}/client
 %{jredir}/lib/%{jre_arch}/client/Xusage.txt
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/client/*.so
@@ -767,7 +784,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/jli/*.so
 %dir %{jredir}/lib/%{jre_arch}/server
 %{jredir}/lib/%{jre_arch}/server/Xusage.txt
+%ifnarch x32
 %{jredir}/lib/%{jre_arch}/server/classes.jsa
+%endif
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/server/*.so
 %{jredir}/lib/%{jre_arch}/jvm.cfg
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libattach.so
@@ -795,7 +814,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libnet.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libnio.so
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libnpt.so
+%ifnarch x32
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsaproc.so
+%endif
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsctp.so
 %{?with_sunec:%attr(755,root,root) %{jredir}/lib/%{jre_arch}/libsunec.so}
 %attr(755,root,root) %{jredir}/lib/%{jre_arch}/libunpack.so
diff --git a/icedtea7-x32-ac.patch b/icedtea7-x32-ac.patch
new file mode 100644
index 0000000..b9a6751
--- /dev/null
+++ b/icedtea7-x32-ac.patch
@@ -0,0 +1,41 @@
+Description: Build zero on x32
+Author: Matthias Klose <doko at ubuntu.com>
+Forwarded: http://mail.openjdk.java.net/pipermail/zero-dev/2014-January/000524.html
+Last-Update: 2014-07-06
+
+Index: b/acinclude.m4
+===================================================================
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -2,10 +2,18 @@ AC_DEFUN([IT_SET_ARCH_SETTINGS],
+ [
+   case "${host_cpu}" in
+     x86_64)
+-      BUILD_ARCH_DIR=amd64
+-      INSTALL_ARCH_DIR=amd64
+-      JRE_ARCH_DIR=amd64
+-      ARCHFLAG="-m64"
++      case "${host}" in
++        *x32)
++          BUILD_ARCH_DIR=x32
++          INSTALL_ARCH_DIR=x32
++          JRE_ARCH_DIR=x32
++          ;;
++        *)
++          BUILD_ARCH_DIR=amd64
++          INSTALL_ARCH_DIR=amd64
++          JRE_ARCH_DIR=amd64
++          ARCHFLAG="-m64"
++      esac
+       ;;
+     i?86)
+       BUILD_ARCH_DIR=i586
+@@ -720,7 +728,7 @@ AC_DEFUN_ONCE([IT_ENABLE_ZERO_BUILD],
+   ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+   dnl can't use AC_CHECK_SIZEOF on multilib
+   case "${ZERO_LIBARCH}" in
+-    arm|i386|ppc|s390|sh|sparc)
++    arm|i386|ppc|s390|sh|sparc|x32)
+       ZERO_BITSPERWORD=32
+       ;;
+     aarch64|alpha|amd64|ia64|ppc64*|s390x|sparcv9)
diff --git a/icedtea7-x32.patch b/icedtea7-x32.patch
new file mode 100644
index 0000000..f7186ee
--- /dev/null
+++ b/icedtea7-x32.patch
@@ -0,0 +1,117 @@
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig	2014-07-06 11:29:29.015366709 +0200
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2014-07-06 11:31:33.112151956 +0200
+@@ -2023,7 +2023,7 @@
+ 
+   #if  (defined IA32)
+     static  Elf32_Half running_arch_code=EM_386;
+-  #elif   (defined AMD64)
++  #elif  (defined AMD64) || (defined X32)
+     static  Elf32_Half running_arch_code=EM_X86_64;
+   #elif  (defined IA64)
+     static  Elf32_Half running_arch_code=EM_IA_64;
+--- openjdk/corba/make/common/shared/Platform.gmk.orig	2014-07-06 11:29:28.747364528 +0200
++++ openjdk/corba/make/common/shared/Platform.gmk	2014-07-06 11:31:33.112151956 +0200
+@@ -163,8 +163,12 @@
+                 ia64) \
+                     echo ia64 \
+                     ;; \
+-                x86_64) \
+-                    echo amd64 \
++                amd64|x86_64) \
++                    if [ "x32" = "x32" ]; then \
++                        echo x32; \
++                    else \
++                        echo amd64; \
++                    fi \
+                     ;; \
+                 sparc*) \
+                     echo sparc \
+--- openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c.orig	2014-06-12 22:14:44.000000000 +0200
++++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c	2014-07-06 11:31:33.112151956 +0200
+@@ -35,7 +35,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #include <sys/utsname.h>
+ #include <netinet/ip.h>
+ 
+--- openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c.orig	2014-06-12 22:14:44.000000000 +0200
++++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c	2014-07-06 11:31:33.112151956 +0200
+@@ -43,7 +43,6 @@
+ #endif
+ #ifdef __linux__
+ #include <unistd.h>
+-#include <sys/sysctl.h>
+ #endif
+ 
+ #include "jvm.h"
+--- openjdk/jdk/make/jdk_generic_profile.sh.orig	2014-06-12 22:14:44.000000000 +0200
++++ openjdk/jdk/make/jdk_generic_profile.sh	2014-07-06 11:31:33.112151956 +0200
+@@ -255,7 +255,12 @@
+   # subdirectory under $JAVA_HOME/jre/lib
+   arch=$(uname -m)
+   case "${arch}" in
+-    x86_64)  ZERO_LIBARCH=amd64     ;;
++    x86_64)
++          if [ "x32" = "x32" ]; then
++              ZERO_LIBARCH=x32
++          else
++              ZERO_LIBARCH=amd64
++          fi;;
+     i?86)    ZERO_LIBARCH=i386      ;;
+     sparc64) ZERO_LIBARCH=sparcv9   ;;
+     arm*)    ZERO_LIBARCH=arm       ;;
+@@ -267,7 +272,7 @@
+ 
+   # ARCH_DATA_MODEL is the number of bits in a pointer
+   case "${ZERO_LIBARCH}" in
+-    arm|i386|ppc|s390|sh|sparc)
++    arm|i386|ppc|s390|sh|sparc|x32)
+       ARCH_DATA_MODEL=32
+       ;;
+     aarch64|alpha|amd64|ia64|ppc64*|s390x|sparcv9)
+@@ -281,7 +286,7 @@
+ 
+   # ZERO_ENDIANNESS is the endianness of the processor
+   case "${ZERO_LIBARCH}" in
+-    arm|aarch64|amd64|i386|ia64|mipsel|ppc64le)
++    arm|aarch64|amd64|i386|ia64|mipsel|ppc64le|x32)
+       ZERO_ENDIANNESS=little
+       ;;
+     ppc|ppc64|s390*|sparc*|alpha)
+@@ -299,6 +304,7 @@
+     ppc*)   ZERO_ARCHDEF=PPC   ;;
+     s390*)  ZERO_ARCHDEF=S390  ;;
+     sparc*) ZERO_ARCHDEF=SPARC ;;
++    x32)    ZERO_ARCHDEF=AMD64 ;;
+     *)      ZERO_ARCHDEF=$(echo "${ZERO_LIBARCH}" | tr a-z A-Z)
+   esac
+   export ZERO_ARCHDEF
+--- openjdk/jdk/make/common/shared/Platform.gmk.orig	2014-07-06 11:29:28.747364528 +0200
++++ openjdk/jdk/make/common/shared/Platform.gmk	2014-07-06 11:31:33.112151956 +0200
+@@ -180,8 +180,12 @@
+                 ia64) \
+                     echo ia64 \
+                     ;; \
+-                x86_64) \
+-                    echo amd64 \
++                amd64|x86_64) \
++                    if [ "x32" = "x32" ]; then \
++                        echo x32; \
++                    else \
++                        echo amd64; \
++                    fi \
+                     ;; \
+                 sparc*) \
+                     echo sparc \
+@@ -228,6 +232,9 @@
+       ifeq ($(ARCH), s390x)
+         ARCH_DATA_MODEL=64
+       endif
++      ifeq ($(ARCH), x32)
++        ARCH_DATA_MODEL=32
++      endif
+       ifeq ($(ARCH), sh)
+         ARCH_DATA_MODEL=32
+       endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/icedtea7.git/commitdiff/ef4429ab8436c14029ee33e4b3f4c6823c7b8ca8



More information about the pld-cvs-commit mailing list