Date: Sat, 24 Oct 2015 14:10:21 -0400 From: "Curtis Hamilton" <hamiltcl@verizon.net> To: "'Greg Lewis'" <glewis@eyesbeyond.com> Cc: <freebsd-java@freebsd.org> Subject: RE: Icedtea on FreeBSD PowerPC Message-ID: <005b01d10e87$3fbefcb0$bf3cf610$@verizon.net> In-Reply-To: <20151024012039.GA57742@misty.eyesbeyond.com> References: <002b01d0ef2d$86363290$92a297b0$@verizon.net> <20150925043739.GA51468@misty.eyesbeyond.com> <009d01d0fab9$827b8050$877280f0$@verizon.net> <001401d10d8a$7487cd80$5d976880$@verizon.net> <20151024012039.GA57742@misty.eyesbeyond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multipart message in MIME format. ------=_NextPart_000_005C_01D10E65.B8ADAAD0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit My initial success was in building the mercurial OpenJDK7 BSD-Port, using the attached build script and instructions obtained from the OpenJDK Wiki Darwin9Build section. Subsequently, I used information from the arm patch to modify the ports Makefile and build the ports distribution. Other than what's in the make file patch, no other patches were needed, as I used the mercurial build as the bootstrap. As you previously noted, the key for non-x86 builds is the bootstrap. I used the GCC java tools and created a bootstrap from sym links to the GCJ executables in /usr/local/bin. I can provide more details if needed, however, building GCC java is not straight forward as it is not an available option for non-x86 GCC builds. -----Original Message----- From: Greg Lewis [mailto:glewis@eyesbeyond.com] Sent: Friday, October 23, 2015 9:21 PM To: Curtis Hamilton <hamiltcl@verizon.net> Cc: freebsd-java@freebsd.org Subject: Re: Icedtea on FreeBSD PowerPC On Fri, Oct 23, 2015 at 08:00:47AM -0400, Curtis Hamilton wrote: > After many failed tries, I finally succeeded in building Openjdk 7 on > PowerPC64. Anyone interested in how it was done or wants the binaries? > > My next challenge is to build OpenJDK 8 on PowerPC64 . Cool :) Do you have patches or were no code changes required? -- Greg > -----Original Message----- > From: owner-freebsd-java@freebsd.org > [mailto:owner-freebsd-java@freebsd.org] > On Behalf Of Curtis Hamilton > Sent: Tuesday, September 29, 2015 9:20 AM > To: 'Greg Lewis' <glewis@eyesbeyond.com> > Cc: freebsd-java@freebsd.org > Subject: RE: Icedtea on FreeBSD PowerPC > > Thanks for the insight, but l don't have a sufficient bootstrap to for > openjdk8. Like I said, I've had some success building openjdk6, but I > get a seg fault and core dump when the newly created 'java' executable is run. > > It would be helpful if you could view the attached log file that is > created and point me to what I'm doing wrong. > > Thanks in advance. > > Curtis > > -----Original Message----- > From: Greg Lewis [mailto:glewis@eyesbeyond.com] > Sent: Friday, September 25, 2015 12:38 AM > To: Curtis Hamilton <hamiltcl@verizon.net> > Cc: freebsd-java@freebsd.org > Subject: Re: Icedtea on FreeBSD PowerPC > > On Mon, Sep 14, 2015 at 04:39:59PM -0400, Curtis Hamilton wrote: > > Has anyone been successful in building openjdk6 or openjdk7 using > > icedtea on a FreeBSD PowerPC based system? If so, I'd love to know > > how > you did it. > > > > I've successfully implemented a workable bootsrap using GCJ and > > ECJ, but encounter problems in building HotSpot. > > You may be able to build openjdk8 using the Zero VM if you apply the > patches from > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201308 > > and additionally modify the Makefile to also allow the correct ARCH > settings for powerpc. > > However, that would still require some sort of bootstrapping, so maybe > you'd hit the same error still, depending on what is causing that. > > -- > Greg Lewis Email : glewis@eyesbeyond.com > Eyes Beyond Web : http://www.eyesbeyond.com > Information Technology FreeBSD : glewis@FreeBSD.org -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org ------=_NextPart_000_005C_01D10E65.B8ADAAD0 Content-Type: application/octet-stream; name="openjdk7_non-x86.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="openjdk7_non-x86.patch" --- ./Makefile=0A= +++ ./Makefile=0A= @@ -78,11 +78,12 @@=0A= =0A= DOS2UNIX_FILES=3D = jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/x= mlsecurity_en.properties=0A= =0A= -OPENJDK_OSARCH=3D bsd-${ARCH:S/i386/i586/}=0A= +OPENJDK_OSARCH=3D = bsd-${ARCH:S/i386/x86/:S/amd64/x86_64/:S/armv6/arm/:S/powerpc64/powerpc/}=0A= =0A= NOPRECIOUSMAKEVARS=3D yes=0A= =0A= -ONLY_FOR_ARCHS=3D i386 amd64=0A= +ONLY_FOR_ARCHS=3D i386 amd64 armv6 powerpc64=0A= =0A= _MAKE_JOBS=3D #=0A= MAKE_ENV+=3D LANG=3D"C" \=0A= @@ -116,6 +117,23 @@=0A= =0A= MAKE_ENV+=3D HOTSPOT_BUILD_JOBS=3D${MAKE_JOBS_NUMBER}=0A= =0A= .include <bsd.port.options.mk>=0A= =0A= +.if ${ARCH} =3D=3D "armv6"=0A= +CONFIGURE_ARGS+=3D --with-jvm-variants=3Dzero=0A= +=0A= +# we're building a zero build=0A= +JDK_BUILDDIR=3D = ${WRKSRC}/build/${OPENJDK_OSARCH}-normal-zero-${JDK_BUILD_TYPE}=0A= +=0A= +# bootstrap-openjdk is based on openjdk7 and can compile openjdk8=0A= +BOOTSTRAP_JDKS=3D ${LOCALBASE}/bootstrap-openjdk=0A= +BOOTSTRAPJDKDIR=3D ${LOCALBASE}/bootstrap-openjdk=0A= +=0A= +# libffi is needed for zerobuild=0A= +BUILD_DEPENDS+=3D = ${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/bootstrap-openjdk=0A= +LIB_DEPENDS+=3D libffi.so:${PORTSDIR}/devel/libffi=0A= +.endif=0A= +=0A= +.if ${ARCH} =3D=3D "powerpc64"=0A= +CONFIGURE_ARGS+=3D --with-jvm-variants=3Dzero=0A= +=0A= +# libffi is needed for zerobuild=0A= +BUILD_DEPENDS+=3D = ${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/bootstrap-openjdk=0A= +LIB_DEPENDS+=3D libffi.so:${PORTSDIR}/devel/libffi=0A= +=0A= +MAKE_ENV+=3D ZERO_BUILD=3Dtrue \=0A= + ZERO_ENDIANNESS=3Dbig \=0A= + ZERO_LIBARCH=3Dppc \=0A= + ZERO_ARCHDEF=3DPPC \=0A= + ZERO_ARCHFLAG=3D"-mpowerpc64" \=0A= + PARALLEL_COMPILE_JOBS=3D8 =0A= +=0A= +.endif=0A= +=0A= BOOTSTRAP_JDKS=3D ${LOCALBASE}/openjdk7 \=0A= ${LOCALBASE}/openjdk6 \=0A= ${LOCALBASE}/bootstrap-openjdk=0A= @@ -143,7 +161,7 @@=0A= =0A= # GCC is broken with PCH: = https://lists.freebsd.org/pipermail/svn-src-all/2015-March/101722.html=0A= .if ${COMPILER_TYPE} =3D=3D gcc=0A= -MAKE_ENV+=3D USE_PRECOMPILED_HEADER=3D0=0A= +MAKE_ENV+=3D USE_PRECOMPILED_HEADER=3D1=0A= .endif=0A= =0A= .if empty(ICONV_LIB)=0A= @@ -160,6 +178,34 @@=0A= ${WRKSRC}/jdk/make/sun/splashscreen/Makefile \=0A= ${WRKSRC}/jdk/make/java/npt/Makefile \=0A= ${WRKSRC}/jdk/make/java/instrument/Makefile=0A= +.endif=0A= +=0A= +.if ${ARCH} =3D=3D "armv6" || "powerpc64"=0A= + # From NetBSD = http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/lang/openjdk7/hacks.mk=0A= + # Workaround incorrect constant folding of subnormals in javac when = the FPU=0A= + # does not handle subnormal arithmetic, like on powerpc in = Flush-to-zero mode.=0A= + # These workarounds avoid underflow conditions during the bootstrap so = the=0A= + # JDK can correctly build itself. Compiling or running programs other = than=0A= + # openjdk itself on such hardware may still cause unexpected behaviour.=0A= + #=0A= + @${REINPLACE_CMD} -e = 's|2.2250738585072014e-308d*|Double.longBitsToDouble(0x10000000000000L)|i= g' \=0A= + -e 's|0x1.0p-1022d*|Double.longBitsToDouble(0x10000000000000L)|ig' \=0A= + -e 's|4.9e-324d*|Double.longBitsToDouble(0x1L)|ig' \=0A= + -e 's|0x0.0000000000001p-1022d*|Double.longBitsToDouble(0x1L)|ig' \=0A= + ${WRKSRC}/jdk/src/share/classes/sun/misc/DoubleConsts.java \=0A= + ${WRKSRC}/jdk/src/share/classes/java/lang/Double.java=0A= + @${REINPLACE_CMD} -e = 's|1.17549435e-38f*|Float.intBitsToFloat(0x800000)|ig' \=0A= + -e 's|0x1.0p-126f*|Float.intBitsToFloat(0x800000)|ig' \=0A= + -e 's|1.4e-45f*|Float.intBitsToFloat(0x1)|ig' \=0A= + -e 's|0x0.000002P-126f*|Float.intBitsToFloat(0x1)|ig' \=0A= + ${WRKSRC}/jdk/src/share/classes/sun/misc/FloatConsts.java \=0A= + ${WRKSRC}/jdk/src/share/classes/java/lang/Float.java=0A= + @${REINPLACE_CMD} -e 's|n.floatValue() =3D=3D 0.0f && = !isZero(proper)|& \&\& Float.floatToIntBits(n) !=3D 0x1|' \=0A= + -e 's|n.doubleValue() =3D=3D 0.0d && !isZero(proper)|& \&\& = Double.doubleToLongBits(n) !=3D 0x1L|' \=0A= + = ${WRKSRC}/langtools/src/share/classes/com/sun/tools/javac/parser/JavacPar= ser.java=0A= + @${REINPLACE_CMD} -e 's|x =3D=3D 0.0f && 1.0f / x > = 0.0f|Float.floatToIntBits(x) =3D=3D 0x0|g' \=0A= + -e 's|x =3D=3D 0.0d && 1.0d / x > 0.0d|Double.doubleToLongBits(x) = =3D=3D 0x0L|g' \=0A= + = ${WRKSRC}/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java=0A= .endif=0A= =0A= .if ${PORT_OPTIONS:MTZUPDATE}=0A= ------=_NextPart_000_005C_01D10E65.B8ADAAD0 Content-Type: application/octet-stream; name="build_script.sh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="build_script.sh" #!/bin/sh=0A= cd /usr/ports/tmp/bsd-port=0A= time env -i \=0A= PATH=3D/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin \=0A= LANG=3DC \=0A= gmake \=0A= CC=3Dgcc48 \=0A= CXX=3Dg++48 \=0A= ALLOW_DOWNLOADS=3Dtrue \=0A= ALT_JAVA_HOME=3D/usr/local/bootstrap-openjdk \=0A= ALT_BOOTDIR=3D/usr/local/bootstrap-openjdk \=0A= ALT_JDK_IMPORT_PATH=3D/usr/local/bootstrap-openjdk \=0A= ALT_FREETYPE_HEADERS_PATH=3D/usr/local/include \=0A= ALT_FREETYPE_LIB_PATH=3D/usr/local/lib \=0A= = ALT_CACERTS_FILE=3D/usr/local/bootstrap-openjdk/jre/lib/security/cacerts = \=0A= LIBFFI_CFLAGS=3D"-I/usr/local/lib/libffi-3.2.1/include" \=0A= DEFAULT_LIBPATH=3D"/lib:/usr/lib:/usr/local/lib" \=0A= NO_DOCS=3Dtrue \=0A= ZERO_BUILD=3Dtrue \=0A= ZERO_ENDIANNESS=3Dbig \=0A= ZERO_LIBARCH=3Dppc \=0A= ZERO_ARCHDEF=3DPPC \=0A= ZERO_ARCHFLAG=3D"-mpowerpc64" \=0A= PARALLEL_COMPILE_JOBS=3D8 \=0A= HOTSPOT_BUILD_JOBS=3D8 =0A= ------=_NextPart_000_005C_01D10E65.B8ADAAD0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005b01d10e87$3fbefcb0$bf3cf610$>