From doko at ubuntu.com Wed Jan 15 02:43:29 2014 From: doko at ubuntu.com (Matthias Klose) Date: Wed, 15 Jan 2014 11:43:29 +0100 Subject: [patch] build openjdk-7 for x86_64-linux-gnux32 Message-ID: <52D66651.3030006@ubuntu.com> 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 -#include #include #include --- 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 -#include #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 ;; *) From gnu.andrew at redhat.com Wed Jan 15 08:50:05 2014 From: gnu.andrew at redhat.com (Andrew) Date: Wed, 15 Jan 2014 11:50:05 -0500 (EST) Subject: [patch] build openjdk-7 for x86_64-linux-gnux32 In-Reply-To: <52D66651.3030006@ubuntu.com> References: <52D66651.3030006@ubuntu.com> Message-ID: <238449918.2008810.1389804605500.JavaMail.root@redhat.com> ----- Original Message ----- > 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 > Support for this came up a while back and I'm not sure what the point of this would be. Why would anyone on x86_64 want an x32 Zero build instead of the x86_64 JIT? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From doko at ubuntu.com Wed Jan 15 09:03:50 2014 From: doko at ubuntu.com (Matthias Klose) Date: Wed, 15 Jan 2014 18:03:50 +0100 Subject: [patch] build openjdk-7 for x86_64-linux-gnux32 In-Reply-To: <238449918.2008810.1389804605500.JavaMail.root@redhat.com> References: <52D66651.3030006@ubuntu.com> <238449918.2008810.1389804605500.JavaMail.root@redhat.com> Message-ID: <52D6BF76.3080305@ubuntu.com> Am 15.01.2014 17:50, schrieb Andrew: > Support for this came up a while back and I'm not sure what the point of this would be. > Why would anyone on x86_64 want an x32 Zero build instead of the x86_64 JIT? I don't care who else does want it. It is needed to get the build dependencies fulfilled for a distribution. While we do have multiarch, we can't yet build-depend on packages of arbitrary foreign architectures. If other distributions can handle that, fine. But it is easier for me to provide an openjdk for x32 than to patch around 100 packages not to use openjdk. Matthias From gnu.andrew at redhat.com Wed Jan 15 12:07:47 2014 From: gnu.andrew at redhat.com (Andrew) Date: Wed, 15 Jan 2014 15:07:47 -0500 (EST) Subject: [patch] build openjdk-7 for x86_64-linux-gnux32 In-Reply-To: <52D6BF76.3080305@ubuntu.com> References: <52D66651.3030006@ubuntu.com> <238449918.2008810.1389804605500.JavaMail.root@redhat.com> <52D6BF76.3080305@ubuntu.com> Message-ID: <1738815439.2126201.1389816467482.JavaMail.root@redhat.com> ----- Original Message ----- > Am 15.01.2014 17:50, schrieb Andrew: > > Support for this came up a while back and I'm not sure what the point of > > this would be. > > Why would anyone on x86_64 want an x32 Zero build instead of the x86_64 > > JIT? > > I don't care who else does want it. It is needed to get the build > dependencies > fulfilled for a distribution. While we do have multiarch, we can't yet > build-depend on packages of arbitrary foreign architectures. If other > distributions can handle that, fine. But it is easier for me to provide an > openjdk for x32 than to patch around 100 packages not to use openjdk. > > Matthias > > Yeah, I get that. I have no problem with most of it as it doesn't affect anyone else. My concern is removing the include line as we have a bunch of antique stuff still building this (who also don't have things like LCMS2, GIO, etc.) that could run into trouble. Is there any way we could ifdef it instead? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07