]> git.pld-linux.org Git - packages/openjdk8.git/blob - x32.patch
up to 1.8.0.302
[packages/openjdk8.git] / x32.patch
1 # DP: Add support for x32
2
3 --- a/common/autoconf/platform.m4
4 +++ b/common/autoconf/platform.m4
5 @@ -31,10 +31,17 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
6    # First argument is the cpu name from the trip/quad
7    case "$1" in
8      x86_64)
9 -      VAR_CPU=x86_64
10 -      VAR_CPU_ARCH=x86
11 -      VAR_CPU_BITS=64
12 -      VAR_CPU_ENDIAN=little
13 +      if test "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ; then
14 +        VAR_CPU=x32
15 +        VAR_CPU_ARCH=x86
16 +        VAR_CPU_BITS=32
17 +        VAR_CPU_ENDIAN=little
18 +      else
19 +        VAR_CPU=x86_64
20 +        VAR_CPU_ARCH=x86
21 +        VAR_CPU_BITS=64
22 +        VAR_CPU_ENDIAN=little
23 +      fi
24        ;;
25      i?86)
26        VAR_CPU=x86
27 @@ -451,7 +458,13 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
28      ppc64)   ZERO_ARCHDEF=PPC64 ;;
29      s390*)   ZERO_ARCHDEF=S390  ;;
30      sparc*)  ZERO_ARCHDEF=SPARC ;;
31 -    x86_64*) ZERO_ARCHDEF=AMD64 ;;
32 +    x86_64*)
33 +      if test "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ; then
34 +        ZERO_ARCHDEF=X32
35 +      else
36 +        ZERO_ARCHDEF=AMD64
37 +      fi
38 +      ;;
39      x86)     ZERO_ARCHDEF=IA32  ;;
40      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
41    esac
42 --- a/hotspot/src/os/linux/vm/os_linux.cpp
43 +++ b/hotspot/src/os/linux/vm/os_linux.cpp
44 @@ -1980,7 +1980,7 @@ void * os::dll_load(const char *filename
45  
46    #if  (defined IA32)
47      static  Elf32_Half running_arch_code=EM_386;
48 -  #elif   (defined AMD64)
49 +  #elif  (defined AMD64) || (defined X32)
50      static  Elf32_Half running_arch_code=EM_X86_64;
51    #elif  (defined IA64)
52      static  Elf32_Half running_arch_code=EM_IA_64;
53 --- a/jdk/make/gensrc/GensrcX11Wrappers.gmk
54 +++ b/jdk/make/gensrc/GensrcX11Wrappers.gmk
55 @@ -91,9 +91,11 @@ ifneq ($(COMPILE_TYPE), cross)
56         $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
57  
58    # use -m32/-m64 only if the compiler supports it
59 +  ifneq ($(OPENJDK_TARGET_CPU),x32)
60    ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
61      MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
62    endif
63 +  endif
64  
65    # Compile the C code into an executable.
66    $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
This page took 0.036121 seconds and 3 git commands to generate.