← Back to team overview

openjdk team mailing list archive

Bug#864643: openjdk-9: Please update zero-sh.diff patch for sh4

 

Source: openjdk-9
Version: 9~b170-2
Severity: normal
Tags: patch
User: debian-superh@xxxxxxxxxxxxxxxx
Usertags: sh4

Hi!

openjdk-9 currently fails to build from source on sh4 with:

/<<PKGBUILDDIR>>/src/hotspot/src/os/linux/vm/os_linux.cpp: In static member function 'static void* os::dll_load(const char*, char*, int)':
/<<PKGBUILDDIR>>/src/hotspot/src/os/linux/vm/os_linux.cpp:1816:9: error: 'running_arch_code' was not declared in this scope
     if (running_arch_code == arch_array[i].code) {
         ^~~~~~~~~~~~~~~~~
make[4]: *** [/<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/os_linux.o] Error 1
lib/CompileJvm.gmk:212: recipe for target '/<<PKGBUILDDIR>>/build/hotspot/variant-zero/libjvm/objs/os_linux.o' failed

That's because the included patch zero-sh.diff is broken. I have fixed
the patch to address this issue. Please update the patch.

Thanks,
Adrian

 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@xxxxxxxxxx
`. `'   Freie Universitaet Berlin - glaubitz@xxxxxxxxxxxxxxxxxxx
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
# DP: Add support for sh

Index: b/hotspot/src/os/linux/vm/os_linux.cpp
===================================================================
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -1766,6 +1766,7 @@ void * os::dll_load(const char *filename
     {EM_PARISC,      EM_PARISC,  ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"},
     {EM_68K,         EM_68K,     ELFCLASS32, ELFDATA2MSB, (char*)"M68k"},
     {EM_AARCH64,     EM_AARCH64, ELFCLASS64, ELFDATA2LSB, (char*)"AARCH64"},
+    {EM_SH,          EM_SH,      ELFCLASS32, ELFDATA2LSB, (char*)"Hitachi SH"}
   };
 
 #if  (defined IA32)
@@ -1798,9 +1799,11 @@ void * os::dll_load(const char *filename
   static  Elf32_Half running_arch_code=EM_MIPS;
 #elif  (defined M68K)
   static  Elf32_Half running_arch_code=EM_68K;
+#elif  (defined SH)
+  static  Elf32_Half running_arch_code=EM_SH;
 #else
     #error Method os::dll_load requires that one of following is defined:\
-        AARCH64, ALPHA, ARM, AMD64, IA32, IA64, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, S390, __sparc
+        AARCH64, ALPHA, ARM, AMD64, IA32, IA64, M68K, MIPS, MIPSEL, PARISC, __powerpc__, __powerpc64__, S390, SH, __sparc
 #endif
 
   // Identify compatability class for VM's architecture and library's architecture