]> git.pld-linux.org Git - packages/icedtea8.git/commitdiff
fix x32 build
authorJacek Konieczny <jajcus@jajcus.net>
Tue, 20 Sep 2016 14:24:26 +0000 (16:24 +0200)
committerJacek Konieczny <jajcus@jajcus.net>
Tue, 20 Sep 2016 14:24:26 +0000 (16:24 +0200)
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
icedtea8-x32.patch
icedtea8.spec

index b9a67516864abfab82b903d73e2e648019299b92..978386097c6b21439388a8d6cb0fe40917df6feb 100644 (file)
@@ -1,15 +1,9 @@
-Description: Build zero on x32
-Author: Matthias Klose <doko@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;
index 2c867a75aa739d4d4b3e0461b8de37108f83975c..d5be11f58f8141106eaa02160a4938fcfb3449b2 100644 (file)
@@ -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__
index 5160c32cafb8308cd98e30a49e8f72c3d72de087..c5c1eee81f7681be85253caddbc3e485a1dbef9f 100644 (file)
@@ -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}
 
This page took 0.127744 seconds and 4 git commands to generate.