[patch] build openjdk-7 for x86_64-linux-gnux32
Matthias Klose
doko at ubuntu.com
Wed Jan 15 02:43:29 PST 2014
Attached are two patches to build icedtea zero on x86_64-linux-gnux32. One for
the icedtea configury, the other for openjdk.
- the Platform.gmk bigs maybe should be based on $host instead.
- the sys/sysctl.h includes seem to be left overs, aren't used
anymore on other architectures.
I didn't look if/how hotspot i386 would build on this architecture.
Matthias
build logs and test results can be found at
http://buildd.debian-ports.org/status/logs.php?pkg=openjdk-7&ver=7u45-2.4.3-5&arch=x32
--------------- jtreg console summary for hotspot ---------------
Error: compiler/5091921/Test6905845.java
Error: compiler/5091921/Test6992759.java
Error: compiler/5091921/Test7020614.java
Error: compiler/6901572/Test.java
Error: compiler/7047069/Test7047069.java
Error: compiler/7100757/Test7100757.java
Error: compiler/7184394/TestAESMain.java
Error: compiler/7196199/Test7196199.java
FAILED: compiler/8010927/Test8010927.java
FAILED: compiler/cpuflags/RestoreMXCSR.java
Error: gc/6941923/test6941923.sh
FAILED: gc/7168848/HumongousAlloc.java
FAILED: gc/g1/TestRegionAlignment.java
FAILED: gc/heap_inspection/TestPrintClassHistogram.java
FAILED: gc/init/TestHandleExceedingProcessSizeLimitIn32BitBuilds.java
FAILED: gc/TestVerifyBeforeGCDuringStartup.java
FAILED: runtime/6929067/Test6929067.sh
FAILED: runtime/7158988/FieldMonitor.java
Error: runtime/7196045/Test7196045.java
FAILED: runtime/CommandLine/CompilerConfigFileWarning.java
FAILED: runtime/CommandLine/ConfigFileWarning.java
FAILED: runtime/NMT/BaselineWithParameter.java
FAILED: runtime/NMT/CommandLineDetail.java
FAILED: runtime/NMT/CommandLineEmptyArgument.java
FAILED: runtime/NMT/CommandLineInvalidArgument.java
FAILED: runtime/NMT/CommandLineSummary.java
FAILED: runtime/NMT/CommandLineTurnOffNMT.java
FAILED: runtime/NMT/JcmdDiffCallsite.java
FAILED: runtime/NMT/JcmdScale.java
FAILED: runtime/NMT/JcmdWithNMTDisabled.java
FAILED: runtime/NMT/MallocTestType.java
FAILED: runtime/NMT/PrintNMTStatistics.java
FAILED: runtime/NMT/PrintNMTStatisticsWithNMTDisabled.java
FAILED: runtime/NMT/ReleaseCommittedMemory.java
FAILED: runtime/NMT/ShutdownTwice.java
FAILED: runtime/NMT/SummaryAfterShutdown.java
FAILED: runtime/NMT/SummarySanityCheck.java
FAILED: runtime/NMT/ThreadedMallocTestType.java
FAILED: runtime/NMT/ThreadedVirtualAllocTestType.java
FAILED: runtime/NMT/VirtualAllocTestType.java
FAILED: sanity/WBApi.java
FAILED: serviceability/attach/AttachWithStalePidFile.java
FAILED: serviceability/ParserTest.java
Test results: passed: 223; failed: 33; error: 10
--------------- jtreg console summary for langtools ---------------
FAILED: com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java
Error: tools/javac/Diagnostics/6769027/T6769027.java
FAILED: tools/javac/processing/6499119/ClassProcessor.java
FAILED: tools/javac/T5090006/T5090006.java
Test results: passed: 1,955; failed: 3; error: 1
-------------- next part --------------
--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig 2013-12-28 17:55:28.029217634 +0100
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2013-12-28 17:55:51.433389820 +0100
@@ -1998,7 +1998,7 @@
#if (defined IA32)
static Elf32_Half running_arch_code=EM_386;
- #elif (defined AMD64)
+ #elif (defined AMD64) || (defined X32)
static Elf32_Half running_arch_code=EM_X86_64;
#elif (defined IA64)
static Elf32_Half running_arch_code=EM_IA_64;
--- openjdk/corba/make/common/shared/Platform.gmk.orig 2013-12-28 17:55:28.029217634 +0100
+++ openjdk/corba/make/common/shared/Platform.gmk 2013-12-28 17:57:17.154020459 +0100
@@ -163,8 +163,12 @@
ia64) \
echo ia64 \
;; \
- x86_64) \
- echo amd64 \
+ amd64|x86_64) \
+ if [ "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ]; then \
+ echo x32; \
+ else \
+ echo amd64; \
+ fi \
;; \
sparc*) \
echo sparc \
--- openjdk/jdk/make/jdk_generic_profile.sh.orig 2013-12-28 17:55:28.029217634 +0100
+++ openjdk/jdk/make/jdk_generic_profile.sh 2013-12-28 17:55:51.433389820 +0100
@@ -255,7 +257,12 @@
# subdirectory under $JAVA_HOME/jre/lib
arch=$(uname -m)
case "${arch}" in
- x86_64) ZERO_LIBARCH=amd64 ;;
+ x86_64)
+ if [ "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ]; then
+ ZERO_LIBARCH=x32
+ else
+ ZERO_LIBARCH=amd64
+ fi;;
i?86) ZERO_LIBARCH=i386 ;;
sparc64) ZERO_LIBARCH=sparcv9 ;;
arm*) ZERO_LIBARCH=arm ;;
@@ -267,7 +275,7 @@
# ARCH_DATA_MODEL is the number of bits in a pointer
case "${ZERO_LIBARCH}" in
- arm|i386|ppc|s390|sh|sparc)
+ arm|i386|ppc|s390|sh|sparc|x32)
ARCH_DATA_MODEL=32
;;
aarch64|alpha|amd64|ia64|ppc64*|s390x|sparcv9)
@@ -281,7 +289,7 @@
# ZERO_ENDIANNESS is the endianness of the processor
case "${ZERO_LIBARCH}" in
- arm|aarch64|amd64|i386|ia64|mipsel|ppc64le)
+ arm|aarch64|amd64|i386|ia64|mipsel|ppc64le|x32)
ZERO_ENDIANNESS=little
;;
ppc*|s390*|sparc*|alpha)
@@ -299,6 +307,7 @@
ppc*) ZERO_ARCHDEF=PPC ;;
s390*) ZERO_ARCHDEF=S390 ;;
sparc*) ZERO_ARCHDEF=SPARC ;;
+ x32) ZERO_ARCHDEF=AMD64 ;;
*) ZERO_ARCHDEF=$(echo "${ZERO_LIBARCH}" | tr a-z A-Z)
esac
export ZERO_ARCHDEF
--- openjdk/jdk/make/common/shared/Platform.gmk.orig 2013-12-28 17:55:28.029217634 +0100
+++ openjdk/jdk/make/common/shared/Platform.gmk 2013-12-28 17:57:02.401911931 +0100
@@ -170,8 +170,12 @@
ia64) \
echo ia64 \
;; \
- x86_64) \
- echo amd64 \
+ amd64|x86_64) \
+ if [ "`dpkg-architecture -qDEB_HOST_ARCH`" = x32 ]; then \
+ echo x32; \
+ else \
+ echo amd64; \
+ fi \
;; \
sparc*) \
echo sparc \
@@ -211,6 +215,9 @@
ifeq ($(ARCH), s390x)
ARCH_DATA_MODEL=64
endif
+ ifeq ($(ARCH), x32)
+ ARCH_DATA_MODEL=32
+ endif
ifeq ($(ARCH), sh)
ARCH_DATA_MODEL=32
endif
--- openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+++ openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
@@ -35,7 +35,6 @@
#endif
#ifdef __linux__
#include <unistd.h>
-#include <sys/sysctl.h>
#include <sys/utsname.h>
#include <netinet/ip.h>
--- openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+++ openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c
@@ -43,7 +43,6 @@
#endif
#ifdef __linux__
#include <unistd.h>
-#include <sys/sysctl.h>
#endif
#include "jvm.h"
-------------- next part --------------
--- acinclude.m4
+++ acinclude.m4
@@ -2,10 +2,18 @@
[
case "${host_cpu}" in
x86_64)
- BUILD_ARCH_DIR=amd64
- INSTALL_ARCH_DIR=amd64
- JRE_ARCH_DIR=amd64
- ARCHFLAG="-m64"
+ case "${host}" in
+ *x32)
+ BUILD_ARCH_DIR=x32
+ INSTALL_ARCH_DIR=x32
+ JRE_ARCH_DIR=x32
+ ;;
+ *)
+ BUILD_ARCH_DIR=amd64
+ INSTALL_ARCH_DIR=amd64
+ JRE_ARCH_DIR=amd64
+ ARCHFLAG="-m64"
+ esac
;;
i?86)
BUILD_ARCH_DIR=i586
@@ -702,10 +710,10 @@
ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
dnl can't use AC_CHECK_SIZEOF on multilib
case "${ZERO_LIBARCH}" in
- arm|i386|ppc|s390|sh|sparc)
+ arm|i386|ppc|s390|sh|sparc|x32)
ZERO_BITSPERWORD=32
;;
- aarch64|alpha|amd64|ia64|ppc64|s390x|sparcv9)
+ aarch64|alpha|amd64|ia64|ppc64*|s390x|sparcv9)
ZERO_BITSPERWORD=64
;;
*)
More information about the distro-pkg-dev
mailing list