[packages/icedtea8] fix x32 build
jajcus
jajcus at pld-linux.org
Tue Sep 20 16:27:08 CEST 2016
commit f985347bfa4f32cc1aae8d06ce44634df9834d35
Author: Jacek Konieczny <jajcus at jajcus.net>
Date: Tue Sep 20 16:24:26 2016 +0200
fix x32 build
I don't know what I am doing, but it builds and seems to work now.
The X11 bindings are probably broken, though, as the 'sizer' binary is
built with wrong ABI.
icedtea8-x32-ac.patch | 37 ++++++++++++++++++-----------
icedtea8-x32.patch | 64 +++++++++++++++++++++++++++++++++++++++++----------
icedtea8.spec | 17 +++++++++-----
3 files changed, 87 insertions(+), 31 deletions(-)
---
diff --git a/icedtea8.spec b/icedtea8.spec
index 5160c32..c5c1eee 100644
--- a/icedtea8.spec
+++ b/icedtea8.spec
@@ -508,6 +508,17 @@ chmod a+x build-bin/ant
SHELL=/bin/bash \
DISTRIBUTION_PATCHES="$(echo pld-patches/*.patch)"
+%{__make} patch \
+ SHELL=/bin/bash \
+ DISTRIBUTION_PATCHES="$(echo pld-patches/*.patch)"
+
+# break here to prepare openjdk patches
+#exit 1
+
+cd openjdk/common/autoconf
+sh autogen.sh
+cd ../../..
+
%{__make} -j1 icedtea \
SHELL=/bin/bash \
DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
@@ -527,12 +538,6 @@ install -d $RPM_BUILD_ROOT{%{_bindir},%{dstdir},%{_mandir}/ja} \
$RPM_BUILD_ROOT{%{jvmjardir},%{_examplesdir}/%{name}-%{version},%{_javasrcdir}} \
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}
-#%{__make} -j1 install \
-# DESTDIR=$RPM_BUILD_ROOT \
-# SHELL=/bin/bash \
-# PRINTF=/bin/printf \
-# MAX_VM_MEMORY=1024
-
# install the 'JDK image', it contains the JRE too
cp -a openjdk.build/images/j2sdk-image/* $RPM_BUILD_ROOT%{dstdir}
diff --git a/icedtea8-x32-ac.patch b/icedtea8-x32-ac.patch
index b9a6751..9783860 100644
--- a/icedtea8-x32-ac.patch
+++ b/icedtea8-x32-ac.patch
@@ -1,15 +1,9 @@
-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],
+diff -dur icedtea-3.1.0.orig/acinclude.m4 icedtea-3.1.0/acinclude.m4
+--- icedtea-3.1.0.orig/acinclude.m4 2016-07-25 05:31:28.876207700 +0200
++++ icedtea-3.1.0/acinclude.m4 2016-09-20 12:56:21.236580626 +0200
+@@ -2,10 +2,18 @@
[
- case "${host_cpu}" in
+ case "${target_cpu}" in
x86_64)
- BUILD_ARCH_DIR=amd64
- INSTALL_ARCH_DIR=amd64
@@ -30,7 +24,7 @@ Index: b/acinclude.m4
;;
i?86)
BUILD_ARCH_DIR=i586
-@@ -720,7 +728,7 @@ AC_DEFUN_ONCE([IT_ENABLE_ZERO_BUILD],
+@@ -641,7 +649,7 @@
ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
dnl can't use AC_CHECK_SIZEOF on multilib
case "${ZERO_LIBARCH}" in
@@ -38,4 +32,21 @@ Index: b/acinclude.m4
+ arm|i386|ppc|s390|sh|sparc|x32)
ZERO_BITSPERWORD=32
;;
- aarch64|alpha|amd64|ia64|ppc64*|s390x|sparcv9)
+ aarch64|alpha|amd64|ia64|ppc64|ppc64le|s390x|sparcv9)
+@@ -2036,7 +2044,15 @@
+ arm64) ;;
+ i?86) ;;
+ sparc) ;;
+- x86_64) ;;
++ x86_64)
++ case "${host}" in
++ *x32)
++ has_native_hotspot_port=no
++ ;;
++ *)
++ ;;
++ esac
++ ;;
+ powerpc64) ;;
+ powerpc64le) ;;
+ *) has_native_hotspot_port=no;
diff --git a/icedtea8-x32.patch b/icedtea8-x32.patch
index 2c867a7..d5be11f 100644
--- a/icedtea8-x32.patch
+++ b/icedtea8-x32.patch
@@ -1,12 +1,12 @@
-diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/common/autoconf/platform.m4 openjdk/common/autoconf/platform.m4
+diff -dur -x '*~' openjdk.orig/common/autoconf/platform.m4 openjdk/common/autoconf/platform.m4
--- openjdk.orig/common/autoconf/platform.m4 2016-07-25 07:38:20.000000000 +0200
-+++ openjdk/common/autoconf/platform.m4 2016-09-20 09:21:06.000000000 +0200
++++ openjdk/common/autoconf/platform.m4 2016-09-20 13:41:45.072136115 +0200
@@ -36,6 +36,12 @@
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
;;
+ x32)
-+ VAR_CPU=x86_64
++ VAR_CPU=x32
+ VAR_CPU_ARCH=x86
+ VAR_CPU_BITS=32
+ VAR_CPU_ENDIAN=little
@@ -14,9 +14,49 @@ diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/common/autoconf/platform.m
i?86)
VAR_CPU=x86
VAR_CPU_ARCH=x86
-diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2016-09-20 09:17:58.000000000 +0200
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2016-09-20 09:19:16.000000000 +0200
+@@ -168,7 +174,7 @@
+
+ # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+ PLATFORM_EXTRACT_VARS_FROM_OS($build_os)
+- PLATFORM_EXTRACT_VARS_FROM_CPU($build_cpu)
++ PLATFORM_EXTRACT_VARS_FROM_CPU(x32)
+ # ..and setup our own variables. (Do this explicitely to facilitate searching)
+ OPENJDK_BUILD_OS="$VAR_OS"
+ OPENJDK_BUILD_OS_API="$VAR_OS_API"
+@@ -193,7 +199,7 @@
+
+ # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
+ PLATFORM_EXTRACT_VARS_FROM_OS($host_os)
+- PLATFORM_EXTRACT_VARS_FROM_CPU($host_cpu)
++ PLATFORM_EXTRACT_VARS_FROM_CPU(x32)
+ # ... and setup our own variables. (Do this explicitely to facilitate searching)
+ OPENJDK_TARGET_OS="$VAR_OS"
+ OPENJDK_TARGET_OS_API="$VAR_OS_API"
+@@ -383,6 +389,7 @@
+ ppc64) ZERO_ARCHDEF=PPC64 ;;
+ s390*) ZERO_ARCHDEF=S390 ;;
+ sparc*) ZERO_ARCHDEF=SPARC ;;
++ x32*) ZERO_ARCHDEF=X32 ;;
+ x86_64*) ZERO_ARCHDEF=AMD64 ;;
+ x86) ZERO_ARCHDEF=IA32 ;;
+ *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
+diff -dur -x '*~' openjdk.orig/common/autoconf/toolchain.m4 openjdk/common/autoconf/toolchain.m4
+--- openjdk.orig/common/autoconf/toolchain.m4 2016-07-25 07:38:20.000000000 +0200
++++ openjdk/common/autoconf/toolchain.m4 2016-09-20 13:40:24.311262883 +0200
+@@ -1026,6 +1026,10 @@
+ ppc )
+ # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
+ ;;
++ x32 )
++ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -DX32"
++ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
++ ;;
+ * )
+ COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
+ CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
+diff -dur -x '*~' openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2016-09-20 13:22:05.697032126 +0200
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2016-09-20 13:40:24.314596390 +0200
@@ -1911,7 +1911,7 @@
#if (defined IA32)
@@ -26,9 +66,9 @@ diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/hotspot/src/os/linux/vm/os
static Elf32_Half running_arch_code=EM_X86_64;
#elif (defined IA64)
static Elf32_Half running_arch_code=EM_IA_64;
-diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/hotspot/src/share/vm/utilities/taskqueue.hpp openjdk/hotspot/src/share/vm/utilities/taskqueue.hpp
+diff -dur -x '*~' openjdk.orig/hotspot/src/share/vm/utilities/taskqueue.hpp openjdk/hotspot/src/share/vm/utilities/taskqueue.hpp
--- openjdk.orig/hotspot/src/share/vm/utilities/taskqueue.hpp 2016-07-25 07:38:24.000000000 +0200
-+++ openjdk/hotspot/src/share/vm/utilities/taskqueue.hpp 2016-09-20 09:22:34.000000000 +0200
++++ openjdk/hotspot/src/share/vm/utilities/taskqueue.hpp 2016-09-20 13:40:24.314596390 +0200
@@ -400,7 +400,7 @@
// Architectures with weak memory model require a barrier here
// to guarantee that bottom is not older than age,
@@ -38,9 +78,9 @@ diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/hotspot/src/share/vm/utili
OrderAccess::fence();
#endif
uint localBot = OrderAccess::load_acquire((volatile juint*)&_bottom);
-diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+diff -dur -x '*~' openjdk.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
--- openjdk.orig/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2016-07-25 07:38:26.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2016-09-20 09:19:37.000000000 +0200
++++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2016-09-20 13:40:24.314596390 +0200
@@ -41,7 +41,6 @@
#endif
#ifdef __linux__
@@ -49,9 +89,9 @@ diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/solaris/native/jav
#include <sys/utsname.h>
#include <netinet/ip.h>
-diff -dur -x '*~' -x '*.orig' -x '*.rej' openjdk.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+diff -dur -x '*~' openjdk.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
--- openjdk.orig/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2016-07-25 07:38:26.000000000 +0200
-+++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2016-09-20 09:19:37.000000000 +0200
++++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c 2016-09-20 13:40:24.314596390 +0200
@@ -43,7 +43,6 @@
#endif
#ifdef __linux__
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/icedtea8.git/commitdiff/f985347bfa4f32cc1aae8d06ce44634df9834d35
More information about the pld-cvs-commit
mailing list