pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang openjdk[78]: add support for NetBSD-*-aarch64



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bbfff09003a6
branches:  trunk
changeset: 312802:bbfff09003a6
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Fri Sep 14 15:53:46 2018 +0000

description:
openjdk[78]: add support for NetBSD-*-aarch64

diffstat:

 lang/openjdk7/Makefile                                                         |   8 +-
 lang/openjdk7/bootstrap.mk                                                     |   9 +-
 lang/openjdk7/distinfo                                                         |  14 +-
 lang/openjdk7/hacks.mk                                                         |   5 +-
 lang/openjdk7/options.mk                                                       |   4 +-
 lang/openjdk7/patches/patch-aa                                                 |  57 +++++++--
 lang/openjdk7/patches/patch-ah                                                 |  24 +++-
 lang/openjdk7/patches/patch-hotspot_src_cpu_zero_vm_cppInterpreter__zero.cpp   |  15 ++
 lang/openjdk7/patches/patch-hotspot_src_cpu_zero_vm_stubGenerator__zero.cpp    |  18 +++
 lang/openjdk7/patches/patch-hotspot_src_os__cpu_bsd__zero_vm_os__bsd__zero.cpp |  18 ++-
 lang/openjdk8/bootstrap.mk                                                     |   9 +-
 lang/openjdk8/distinfo                                                         |  10 +-
 lang/openjdk8/hacks.mk                                                         |   5 +-
 lang/openjdk8/patches/patch-aa                                                 |  43 ++++--
 lang/openjdk8/patches/patch-jdk_make_CompileLaunchers.gmk                      |  14 ++-
 15 files changed, 194 insertions(+), 59 deletions(-)

diffs (truncated from 648 to 300 lines):

diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/Makefile
--- a/lang/openjdk7/Makefile    Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/Makefile    Fri Sep 14 15:53:46 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.128 2018/08/20 16:59:34 tnn Exp $
+# $NetBSD: Makefile,v 1.129 2018/09/14 15:53:46 tnn Exp $
 
 JDK_MICRO=     141
 DISTNAME=      openjdk-1.7.${JDK_MICRO}-20170813
@@ -142,6 +142,11 @@
 CFLAGS+=       -fno-delete-null-pointer-checks
 .endif
 
+# no multilib support on aarch64 yet
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64)
+BUILDLINK_TRANSFORM+=  rm:-m64
+.endif
+
 .if !empty(PKGSRC_COMPILER:Mclang)
 _WRAP_EXTRA_ARGS.CXX+= -Wno-parentheses -Wno-sign-conversion \
                        -Wno-shorten-64-to-32 -Wno-conversion \
@@ -207,6 +212,7 @@
 post-extract:
        chmod +x ${ANT_BIN}/ant
        ${LN} -s mapfile-i586 ${WRKSRC}/jdk/make/java/main/java/mapfile-arm
+       ${LN} -s mapfile-amd64 ${WRKSRC}/jdk/make/java/main/java/mapfile-aarch64
 # These libs are bundled w/ the netbsd-7 bootstrap to facilitate building with
 # MKLLVM=yes / MKGCC=no. Nuke them from bootstrap if they are present in base.
 .if exists(/lib/libgcc_s.so.1)
diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/bootstrap.mk
--- a/lang/openjdk7/bootstrap.mk        Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/bootstrap.mk        Fri Sep 14 15:53:46 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.20 2017/08/14 00:02:16 ryoon Exp $
+# $NetBSD: bootstrap.mk,v 1.21 2018/09/14 15:53:46 tnn Exp $
 #
 # This file contains a map of available binary bootstrap toolchains
 # and which kit to use for each supported platform.
@@ -25,6 +25,7 @@
 
 ONLY_FOR_PLATFORM=     NetBSD-[5678].*-i386 NetBSD-[5678].*-x86_64
 ONLY_FOR_PLATFORM+=    NetBSD-[78].*-sparc64 NetBSD-[78].*-earmv[67]hf
+ONLY_FOR_PLATFORM+=    NetBSD-*-aarch64
 ONLY_FOR_PLATFORM+=    DragonFly-[34].*-* SunOS-*-* FreeBSD-10.*-x86_64
 
 BOOT.nb5-i386=         bootstrap-jdk-1.7.76-netbsd-5-i386-20150301.tar.xz
@@ -35,6 +36,7 @@
 BOOT.nb7-amd64=                bootstrap-jdk-1.7.76-netbsd-7-amd64-20150301.tar.xz
 BOOT.nb7-sparc64=      bootstrap-jdk-1.7.76-netbsd-7-sparc64-20150301.tar.xz
 BOOT.nb7-earmv6hf=     bootstrap-jdk-1.7.76-netbsd-7-earmv6hf-20150306.tar.xz
+BOOT.nb8-aarch64=      bootstrap-jdk-1.7.141-netbsd-8-aarch64-20180914.tar.xz
 BOOT.fbsd10-amd64=     bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz
 
 #XXX should be regenerated
@@ -81,6 +83,11 @@
 EXTRACT_ONLY+=         ${BOOT.nb7-earmv6hf}
 .endif
 
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || make(distinfo)
+DISTFILES+=            ${BOOT.nb8-aarch64}
+EXTRACT_ONLY+=         ${BOOT.nb8-aarch64}
+.endif
+
 .if !empty(MACHINE_PLATFORM:MDragonFly-3.6*-x86_64) || make(distinfo)
 DISTFILES+=            ${BOOT.dfly3.6-amd64}
 EXTRACT_ONLY+=         ${BOOT.dfly3.6-amd64}
diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/distinfo
--- a/lang/openjdk7/distinfo    Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/distinfo    Fri Sep 14 15:53:46 2018 +0000
@@ -1,9 +1,13 @@
-$NetBSD: distinfo,v 1.91 2018/07/24 16:07:24 jperkin Exp $
+$NetBSD: distinfo,v 1.92 2018/09/14 15:53:46 tnn Exp $
 
 SHA1 (openjdk7/apache-ant-1.9.4-bin.tar.bz2) = 99bff3c702dd79076f4e705e3541f7e35bbb4306
 RMD160 (openjdk7/apache-ant-1.9.4-bin.tar.bz2) = 7f4263d617bbf40a15eab401369d18a755f8d260
 SHA512 (openjdk7/apache-ant-1.9.4-bin.tar.bz2) = a7481218cf12b0c46cad87ec0fd7be1ae4ba5443c151528a5ec6d1b681e6afba08fd0344e3e97a3c7f8f6a0c948e39e8a714379824568cf83fa18a5276adb16b
 Size (openjdk7/apache-ant-1.9.4-bin.tar.bz2) = 4351965 bytes
+SHA1 (openjdk7/bootstrap-jdk-1.7.141-netbsd-8-aarch64-20180914.tar.xz) = df24cbd6fb2ae529c80ab9d80b30680c24f43f44
+RMD160 (openjdk7/bootstrap-jdk-1.7.141-netbsd-8-aarch64-20180914.tar.xz) = e755550ef882116ea9d8e1d272d07e7b297deec8
+SHA512 (openjdk7/bootstrap-jdk-1.7.141-netbsd-8-aarch64-20180914.tar.xz) = 
a1f9dcb60e384f6e08bc65547dbe40ac0cd7709f340241f9fd6a9cf252c9fe07be86b84fee3cf75c5183c7fee8ee95c08679db15c2998734df0b2f4bb46793e5
+Size (openjdk7/bootstrap-jdk-1.7.141-netbsd-8-aarch64-20180914.tar.xz) = 23413672 bytes
 SHA1 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 7408f52d3bbe35c2b14bbd3215cbf60f1335d334
 RMD160 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 24f1577b5fc86d137f070aedb4610c8c89e45815
 SHA512 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 
6ed928cc68503c27edd6f3a90f94e1e762192d41997b12903e37071f4fcd34f5579fa970e59c240928eaae60729300fbfdb02a5ec1136bc757ee24f1ee554af4
@@ -57,11 +61,11 @@
 SHA512 (openjdk7/rhino1_7R5.zip) = 0f89d76dd5dee348b4d0593f3ee46e4a3918770991cd5752ae92fa31958b49407f5beeb258d44241411d8cc4f1ce09193791c001f19b6423ddcfe128a184f863
 Size (openjdk7/rhino1_7R5.zip) = 10227088 bytes
 SHA1 (patch-Makefile) = a9e415d19c2a8edb96a60ffdf81c804476a8e2f6
-SHA1 (patch-aa) = cd883463de83f64baf24fdb236b7ca87f9132ec3
+SHA1 (patch-aa) = 6a3ce474e5a42a6ab80a469a66a09c6d87c7ea1e
 SHA1 (patch-ab) = 35d5a4a4aa32f8b92ba82f583a2d31f2b7af7998
 SHA1 (patch-ac) = 7a7853d8d0fd451e64a6fc39c28bd2bd8173adc6
 SHA1 (patch-ag) = 83ec8015b8e0f2657f4289cea84bdc9b6d0c5e88
-SHA1 (patch-ah) = 2d67794791d84294e0ff1a217cb538725ddd95f0
+SHA1 (patch-ah) = 8ec88b2a871b5d964323d5be169bb2370a221b07
 SHA1 (patch-ak) = a8ce55038ee8755cf69a23bf77c4ea79466a8897
 SHA1 (patch-al) = 9df456ae11f1c11f885ed3881dc4ef2aa4585b6e
 SHA1 (patch-am) = 77185fb77c7b569f1d1a389a15eb8aca76f51c92
@@ -97,11 +101,13 @@
 SHA1 (patch-hotspot_make_solaris_makefiles_product.make) = 6105c8e7f8b612e70957bccf7313384488388aa5
 SHA1 (patch-hotspot_make_solaris_makefiles_saproc.make) = 8a034088ca3c9f5a625849b772dd51f65fad0b43
 SHA1 (patch-hotspot_make_solaris_makefiles_vm.make) = d72c16b90479c5df0dc33f3b30916b0552dcc17a
+SHA1 (patch-hotspot_src_cpu_zero_vm_cppInterpreter__zero.cpp) = 273e588661fd82411c9f7b48f2bf142bbc8caebb
 SHA1 (patch-hotspot_src_cpu_zero_vm_methodHandles__zero.cpp) = 9f7acf1eff3baba430880be9fd0f6148056dd088
 SHA1 (patch-hotspot_src_cpu_zero_vm_nativeInst__zero.cpp) = dcd83b65a7d74e153a3e1c44f8c7980827ec20c7
+SHA1 (patch-hotspot_src_cpu_zero_vm_stubGenerator__zero.cpp) = fe4ea1c55e686d67714c37baa0605f58a3becdb7
 SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_atomic__bsd__zero.inline.hpp) = e87224f8b67dc78fa411d30beff82ce5ccbb4cc5
 SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_orderAccess__bsd__zero.inline.hpp) = 6311d68db9064afc470f1d9fd37e63011899659a
-SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_os__bsd__zero.cpp) = d82b08803f71d68d6123a2e31e1280a6c2c5bb0e
+SHA1 (patch-hotspot_src_os__cpu_bsd__zero_vm_os__bsd__zero.cpp) = f99c0d7981f4479b8d738079a9f08abdbbeecd4a
 SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_atomic__solaris__x86.inline.hpp) = 2bf9147643be4ac711d1bf94eb0e6ae4abad20c6
 SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_orderAccess__solaris__x86.inline.hpp) = 82818bc8d8fee46403b88cf52a7c978b5ea0005c
 SHA1 (patch-hotspot_src_os__cpu_solaris__x86_vm_os__solaris__x86.cpp) = b2ffc4679a4abe581c6ef3aef630b6570e5cfc41
diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/hacks.mk
--- a/lang/openjdk7/hacks.mk    Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/hacks.mk    Fri Sep 14 15:53:46 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.4 2016/03/08 20:03:52 tnn Exp $
+# $NetBSD: hacks.mk,v 1.5 2018/09/14 15:53:46 tnn Exp $
 
 .if !defined(OPENJDK7_HACKS_MK)
 OPENJDK7_HACKS_MK=     # empty
@@ -19,7 +19,8 @@
 # openjdk itself on such hardware may still cause unexpected behaviour.
 #
 
-.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)
+.if !empty(MACHINE_PLATFORM:MNetBSD-*-*arm*)   || \
+       !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64)
 PKG_HACKS+=            broken-ieee-floats
 SUBST_CLASSES+=                fpu
 SUBST_STAGE.fpu=       pre-build
diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/options.mk
--- a/lang/openjdk7/options.mk  Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/options.mk  Fri Sep 14 15:53:46 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.11 2015/03/04 17:01:02 tnn Exp $
+# $NetBSD: options.mk,v 1.12 2018/09/14 15:53:46 tnn Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.openjdk7
 PKG_OPTIONS_OPTIONAL_GROUPS=   variant
@@ -84,7 +84,7 @@
 .if !empty(PKG_OPTIONS:Mjdk-zero-vm) || !empty(PKG_OPTIONS:Mjdk-zeroshark-vm)
 MAKE_ENV+=             ZERO_BUILD=true
 MAKE_ENV+=             ZERO_LIBARCH=${MACHINE_ARCH:S/x86_64/amd64/:S/sparc64/sparcv9/:C/^e?arm.*$/arm/}
-MAKE_ENV+=             ZERO_ARCHDEF=${MACHINE_ARCH:S/i386/IA32/:S/x86_64/AMD64/:S/sparc64/SPARC/:C/^e?arm.*$/ARM/}
+MAKE_ENV+=             ZERO_ARCHDEF=${MACHINE_ARCH:S/i386/IA32/:S/x86_64/AMD64/:S/sparc64/SPARC/:C/^e?arm.*$/ARM/:S/aarch64/AARCH64/}
 .include "../../mk/endian.mk"
 MAKE_ENV+=             ZERO_ENDIANNESS=${MACHINE_ENDIAN}
 .include "../../devel/libffi/buildlink3.mk"
diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/patches/patch-aa
--- a/lang/openjdk7/patches/patch-aa    Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/patches/patch-aa    Fri Sep 14 15:53:46 2018 +0000
@@ -1,24 +1,33 @@
-$NetBSD: patch-aa,v 1.14 2015/02/21 20:20:03 tnn Exp $
+$NetBSD: patch-aa,v 1.15 2018/09/14 15:53:46 tnn Exp $
 
 DragonFly support.
 Add workaround for missing  sem_timedwait() in NetBSD < 6.99.4
+Workaround incomplete libc/no alloca(3) on NetBSD/aarch64
 
---- hotspot/src/os/bsd/vm/os_bsd.cpp.orig      2015-01-26 15:21:44.000000000 +0000
+--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig      2017-08-13 05:55:27.000000000 +0000
 +++ hotspot/src/os/bsd/vm/os_bsd.cpp
-@@ -126,8 +126,11 @@
+@@ -22,6 +22,11 @@
+  *
+  */
+ 
++#if defined(__NetBSD__) && defined(__aarch64__)
++// there is no alloca(3) yet on this port
++#define alloca(size) __builtin_alloca(size)
++#endif
++
+ // no precompiled headers
+ #include "classfile/classLoader.hpp"
+ #include "classfile/systemDictionary.hpp"
+@@ -126,7 +131,7 @@
  # include <inttypes.h>
  # include <sys/ioctl.h>
  
 -#if defined(__FreeBSD__) || defined(__NetBSD__)
 +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
  # include <elf.h>
-+#if !defined(EM_ALPHA)
-+#define EM_ALPHA 0x9026
-+#endif
  #endif
  
- #ifdef __APPLE__
-@@ -340,6 +343,7 @@ void os::Bsd::initialize_system_info() {
+@@ -327,6 +332,7 @@ void os::Bsd::initialize_system_info() {
    size_t len;
    int cpu_val;
    julong mem_val;
@@ -26,7 +35,7 @@
  
    /* get processors count via hw.ncpus sysctl */
    mib[0] = CTL_HW;
-@@ -372,14 +376,11 @@ void os::Bsd::initialize_system_info() {
+@@ -359,14 +365,11 @@ void os::Bsd::initialize_system_info() {
         _physical_memory = 256*1024*1024;       // fallback (XXXBSD?)
    }
  
@@ -46,7 +55,7 @@
  #endif
  }
  #else
-@@ -458,7 +459,7 @@ void os::init_system_properties_values()
+@@ -445,7 +448,7 @@ void os::init_system_properties_values()
   *        7: The default directories, normally /lib and /usr/lib.
   */
  #ifndef DEFAULT_LIBPATH
@@ -55,17 +64,33 @@
  #endif
  
  #define EXTENSIONS_DIR  "/lib/ext"
-@@ -2232,7 +2233,9 @@ void * os::dll_load(const char *filename
+@@ -2227,9 +2230,16 @@ void * os::dll_load(const char *filename
+     {EM_SPARCV9,     EM_SPARCV9, ELFCLASS64, ELFDATA2MSB, (char*)"Sparc v9 64"},
      {EM_PPC,         EM_PPC,     ELFCLASS32, ELFDATA2MSB, (char*)"Power PC 32"},
      {EM_PPC64,       EM_PPC64,   ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"},
++#if defined(EM_AARCH64)
++    {EM_AARCH64,     EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"Aarch64"},
++#endif
      {EM_ARM,         EM_ARM,     ELFCLASS32,   ELFDATA2LSB, (char*)"ARM"},
-+#if 0
++#if defined(EM_S390)
      {EM_S390,        EM_S390,    ELFCLASSNONE, ELFDATA2MSB, (char*)"IBM System/390"},
 +#endif
++#if defined(EM_ALPHA)
      {EM_ALPHA,       EM_ALPHA,   ELFCLASS64, ELFDATA2LSB, (char*)"Alpha"},
++#endif
      {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"},
      {EM_MIPS,        EM_MIPS,    ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"},
-@@ -2829,6 +2832,33 @@ bool Semaphore::timedwait(unsigned int s
+     {EM_PARISC,      EM_PARISC,  ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
+@@ -2252,6 +2262,8 @@ void * os::dll_load(const char *filename
+     static  Elf32_Half running_arch_code=EM_PPC;
+   #elif  (defined ARM)
+     static  Elf32_Half running_arch_code=EM_ARM;
++  #elif  (defined AARCH64)
++    static  Elf32_Half running_arch_code=EM_AARCH64;
+   #elif  (defined S390)
+     static  Elf32_Half running_arch_code=EM_S390;
+   #elif  (defined ALPHA)
+@@ -2825,6 +2837,33 @@ bool Semaphore::timedwait(unsigned int s
  
  #else
  
@@ -99,7 +124,7 @@
  bool Semaphore::trywait() {
    return sem_trywait(&_semaphore) == 0;
  }
-@@ -2979,7 +3009,7 @@ static void warn_fail_commit_memory(char
+@@ -2975,7 +3014,7 @@ static void warn_fail_commit_memory(char
  //       problem.
  bool os::pd_commit_memory(char* addr, size_t size, bool exec) {
    int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
@@ -108,7 +133,7 @@
    // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD
    if (::mprotect(addr, size, prot) == 0) {
      return true;
-@@ -3893,7 +3923,7 @@ OSReturn os::set_native_priority(Thread*
+@@ -3901,7 +3940,7 @@ OSReturn os::set_native_priority(Thread*
  #ifdef __OpenBSD__
    // OpenBSD pthread_setprio starves low priority threads
    return OS_OK;
@@ -117,7 +142,7 @@
    int ret = pthread_setprio(thread->osthread()->pthread_id(), newpri);
    return (ret == 0) ? OS_OK : OS_ERR;
  #elif defined(__APPLE__) || defined(__NetBSD__)
-@@ -3922,7 +3952,7 @@ OSReturn os::get_native_priority(const T
+@@ -3930,7 +3969,7 @@ OSReturn os::get_native_priority(const T
    }
  
    errno = 0;
diff -r ace8ead95451 -r bbfff09003a6 lang/openjdk7/patches/patch-ah
--- a/lang/openjdk7/patches/patch-ah    Fri Sep 14 15:43:32 2018 +0000
+++ b/lang/openjdk7/patches/patch-ah    Fri Sep 14 15:53:46 2018 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-ah,v 1.6 2015/02/21 20:21:56 tnn Exp $
+$NetBSD: patch-ah,v 1.7 2018/09/14 15:53:46 tnn Exp $
 
 DragonFly support.
 Disable SunOS multiarch.
 Add ARM support.
 
---- jdk/make/common/shared/Platform.gmk.orig   2015-01-26 15:20:57.000000000 +0000
+--- jdk/make/common/shared/Platform.gmk.orig   2017-08-13 05:55:12.000000000 +0000
 +++ jdk/make/common/shared/Platform.gmk
 @@ -119,7 +119,7 @@ ifeq ($(SYSTEM_UNAME), SunOS)
      ARCH := $(shell isainfo -n)
@@ -15,7 +15,7 @@
    endif
    # Need to maintain the jre/lib/i386 location for 32-bit Intel
    ifeq ($(ARCH), i586)
-@@ -224,6 +224,13 @@ ifeq ($(SYSTEM_UNAME), Linux)
+@@ -241,6 +241,13 @@ ifeq ($(SYSTEM_UNAME), Linux)
    MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )



Home | Main Index | Thread Index | Old Index