]> git.pld-linux.org Git - packages/openjdk9.git/blame - x32.patch
- unconditional noarch subpackages
[packages/openjdk9.git] / x32.patch
CommitLineData
2692550d
JP
1diff -urN jdk9u-jdk-9.0.4+12.orig/common/autoconf/flags.m4 jdk9u-jdk-9.0.4+12/common/autoconf/flags.m4
2--- jdk9u-jdk-9.0.4+12.orig/common/autoconf/flags.m4 2017-12-20 00:25:20.000000000 +0100
3+++ jdk9u-jdk-9.0.4+12/common/autoconf/flags.m4 2020-08-29 23:58:39.603994302 +0200
4@@ -215,7 +215,10 @@
5 COMPILER_COMMAND_FILE_FLAG="-f"
6 COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
7 else
8- COMPILER_TARGET_BITS_FLAG="-m"
9+ case $CC in
10+ *x32-*) COMPILER_TARGET_BITS_FLAG="-mx";;
11+ *) COMPILER_TARGET_BITS_FLAG="-m"
12+ esac
13 COMPILER_COMMAND_FILE_FLAG="@"
14 COMPILER_BINDCMD_FILE_FLAG=""
15
16diff -urN jdk9u-jdk-9.0.4+12.orig/common/autoconf/platform.m4 jdk9u-jdk-9.0.4+12/common/autoconf/platform.m4
17--- jdk9u-jdk-9.0.4+12.orig/common/autoconf/platform.m4 2017-12-20 00:25:20.000000000 +0100
18+++ jdk9u-jdk-9.0.4+12/common/autoconf/platform.m4 2020-08-29 23:54:36.322300132 +0200
38bddea5
JK
19@@ -31,10 +31,20 @@
20 # First argument is the cpu name from the trip/quad
21 case "$1" in
22 x86_64)
23- VAR_CPU=x86_64
24- VAR_CPU_ARCH=x86
25- VAR_CPU_BITS=64
26- VAR_CPU_ENDIAN=little
27+ case "$target_os" in
28+ *x32)
29+ VAR_CPU=x32
30+ VAR_CPU_ARCH=x86
31+ VAR_CPU_BITS=32
32+ VAR_CPU_ENDIAN=little
33+ ;;
34+ *)
35+ VAR_CPU=x86_64
36+ VAR_CPU_ARCH=x86
37+ VAR_CPU_BITS=64
38+ VAR_CPU_ENDIAN=little
39+ ;;
40+ esac
41 ;;
42 i?86)
43 VAR_CPU=x86
2692550d
JP
44@@ -408,6 +418,14 @@
45 HOTSPOT_$1_CPU_DEFINE=IA32
46 elif test "x$OPENJDK_$1_CPU" = xx86_64; then
47 HOTSPOT_$1_CPU_DEFINE=AMD64
38bddea5
JK
48+ case "$target_os" in
49+ *x32)
2692550d 50+ HOTSPOT_$1_CPU_DEFINE=X32
38bddea5
JK
51+ ;;
52+ *)
2692550d 53+ HOTSPOT_$1_CPU_DEFINE=AMD64
38bddea5
JK
54+ ;;
55+ esac
2692550d
JP
56 elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
57 HOTSPOT_$1_CPU_DEFINE=SPARC
58 elif test "x$OPENJDK_$1_CPU" = xaarch64; then
59diff -urN jdk9u-jdk-9.0.4+12.orig/hotspot/src/os/linux/vm/os_linux.cpp jdk9u-jdk-9.0.4+12/hotspot/src/os/linux/vm/os_linux.cpp
60--- jdk9u-jdk-9.0.4+12.orig/hotspot/src/os/linux/vm/os_linux.cpp 2020-08-29 23:50:35.510694441 +0200
61+++ jdk9u-jdk-9.0.4+12/hotspot/src/os/linux/vm/os_linux.cpp 2020-08-29 23:55:07.785416515 +0200
62@@ -1770,7 +1770,7 @@
38bddea5 63
2692550d
JP
64 #if (defined IA32)
65 static Elf32_Half running_arch_code=EM_386;
66-#elif (defined AMD64)
67+#elif (defined AMD64) || (defined X32)
68 static Elf32_Half running_arch_code=EM_X86_64;
69 #elif (defined IA64)
70 static Elf32_Half running_arch_code=EM_IA_64;
71diff -urN jdk9u-jdk-9.0.4+12.orig/jdk/make/gensrc/GensrcX11Wrappers.gmk jdk9u-jdk-9.0.4+12/jdk/make/gensrc/GensrcX11Wrappers.gmk
72--- jdk9u-jdk-9.0.4+12.orig/jdk/make/gensrc/GensrcX11Wrappers.gmk 2018-01-13 03:07:38.000000000 +0100
73+++ jdk9u-jdk-9.0.4+12/jdk/make/gensrc/GensrcX11Wrappers.gmk 2020-08-29 23:55:48.198473585 +0200
38bddea5
JK
74@@ -87,9 +87,11 @@
75 $(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
76
77 # use -m32/-m64 only if the compiler supports it
78+ ifneq ($(OPENJDK_TARGET_CPU),x32)
79 ifeq ($(COMPILER_SUPPORTS_TARGET_BITS_FLAG), true)
80 MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
81 endif
82+ endif
83
2692550d
JP
84 SIZER_CFLAGS := \
85 -I$(JDK_TOPDIR)/src/java.base/share/native/include \
86diff -urN jdk9u-jdk-9.0.4+12.orig/jdk/src/jdk.pack/share/native/common-unpack/unpack.cpp jdk9u-jdk-9.0.4+12/jdk/src/jdk.pack/share/native/common-unpack/unpack.cpp
87--- jdk9u-jdk-9.0.4+12.orig/jdk/src/jdk.pack/share/native/common-unpack/unpack.cpp 2018-01-13 03:07:38.000000000 +0100
88+++ jdk9u-jdk-9.0.4+12/jdk/src/jdk.pack/share/native/common-unpack/unpack.cpp 2020-08-29 23:59:35.900292250 +0200
89@@ -37,7 +37,7 @@
4e46d123
JK
90 * Solaris compilers will define __sparcv9 or __x86_64 on 64bit compilations.
91 */
2692550d
JP
92 #if !defined (_MSC_VER) && \
93- (defined(_LP64) || defined(__sparcv9) || defined(__x86_64))
94+ (defined(_LP64) || defined(__sparcv9) || defined(__x86_64) && !defined(__ILP32__))
4e46d123
JK
95 #define LONG_LONG_FORMAT "%ld"
96 #define LONG_LONG_HEX_FORMAT "%lx"
97 #else
This page took 0.054222 seconds and 4 git commands to generate.