From owner-freebsd-ppc@freebsd.org Mon Nov 2 15:25:46 2015 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4ED6CA03267 for ; Mon, 2 Nov 2015 15:25:46 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from vms173025pub.verizon.net (vms173025pub.verizon.net [206.46.173.25]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27324159A; Mon, 2 Nov 2015 15:25:45 +0000 (UTC) (envelope-from hamiltcl@verizon.net) Received: from lenoil1 ([96.255.168.17]) by vms173025.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0NX7005DL1HVMMD0@vms173025.mailsrvcs.net>; Mon, 02 Nov 2015 09:25:09 -0600 (CST) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Nc0brD34 c=1 sm=1 tr=0 a=TXQDfM1T7tsaHFmtCUVSow==:117 a=o1OHuDzbAAAA:8 a=oR5dmqMzAAAA:8 a=qtqOOiqGOCEA:10 a=DAwyPP_o2Byb1YXLmDAA:9 a=6I5d2MoRAAAA:8 a=1XWaLZrsAAAA:8 a=7JZgkrlwmgOfvKVNcNAA:9 a=CjuIK1q_8ugA:10 a=w-ak978TGoUXCcWceoEA:9 From: "Curtis Hamilton" To: "'Andreas Tobler'" , "'Steve Wills'" , "'Justin Hibbits'" Cc: "'FreeBSD PowerPC ML'" References: <002a01d11001$a4b126e0$ee1374a0$@verizon.net> <003701d1102a$ee366c70$caa34550$@verizon.net> <00f701d1129c$b82b0400$28810c00$@verizon.net> <563370BF.8010602@FreeBSD.org> <012c01d11328$caef1220$60cd3660$@verizon.net> <5633D743.9070002@fgznet.ch> <5633E35A.50402@fgznet.ch> <5635458E.2070700@fgznet.ch> In-reply-to: <5635458E.2070700@fgznet.ch> Subject: RE: OpenJDK for PowerPC64 Date: Mon, 02 Nov 2015 10:25:04 -0500 Message-id: <018b01d11582$a7300950$f5901bf0$@verizon.net> MIME-version: 1.0 Content-type: multipart/mixed; boundary="----=_NextPart_000_018C_01D11558.BE6042E0" X-Mailer: Microsoft Outlook 15.0 Thread-index: AQKRkMsb+GvouUjCqm4Yxd05iNTYtAHpldllAV94MsUBawMSHgIHk2b5Ak5uG5sCFhOKpAJFjLidATxg7hwBEmTV6pyKOyqg Content-language: en-us X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2015 15:25:46 -0000 This is a multipart message in MIME format. ------=_NextPart_000_018C_01D11558.BE6042E0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Attached are the instructions for setting up a bootstrap for building OpenJDK on FreeBSD. In an earlier email I provided the build script used to build the BSD-Port mercurial, using the bootstrap setup in the instructions. Let me know if you have questions. -Curtis -----Original Message----- From: Andreas Tobler [mailto:andreast-list@fgznet.ch] Sent: Saturday, October 31, 2015 6:50 PM To: Curtis Hamilton ; 'Steve Wills' ; 'Justin Hibbits' Cc: 'FreeBSD PowerPC ML' Subject: Re: OpenJDK for PowerPC64 On 30.10.15 22:38, Andreas Tobler wrote: > On 30.10.15 21:46, Andreas Tobler wrote: >> On 30.10.15 16:36, Curtis Hamilton wrote: >>> Steve, >>> >>> I'll work on the patch. In the meantime, if you'd like to give them >>> a try, I've built OpenJDK7/8 Zero VM for powerpc64. It's available >>> at the below >>> URL: >>> >>> https://drive.google.com/folderview?id=0Bz7VO-WP3rlpM3BabUd6ejlya3c& >>> usp=shar >>> ing >> >> Do you need 32-bit powerpc stuff to bootstrap OpenJDK? >> >> If not, you can speed up the gcc build with the attached patch. >> It gives you the possibility to choose java for powerpc64 and to >> disable/enable multilibs for powerpc64. >> >> I just successfully built the gcc5-devel on my quad, including >> multilibs) >> >> The other versions are part of my todo, after fixing gcc trunk.... >> >> The multilib switch is part of John Merino's work. Here I have to apologize, it's the work from Julio Merino. I seem to mix John Marino and Julio Merino, sorry. >> I recommend to use a compiler as new as possible, although, not the >> 6.0-devel since it is broken, at least for me. >> >> You can use USES_GCC = 5.2 in the ports Makefile to say which gcc >> compiler you wan to use. > > I just noticed some weird stuff with gcc5-devel, Try to use the gcc49, > the patch applies there too. I'll run some tests on gcc49 during the night. The gcc49 and below are not usable due to the fact that they do not install properly. The reason is the multilib part for soft-float which is not working properly. But this part is not needed. > The gcc5-devel part I solve later. It is solved, patch pending for gcc trunk and gcc-5. A leftover from adding PIE support. My fault, but I do not run all combinations of bootstrapping all the time since the machine is very power hungry... Attached the patch I used to build a gcc-49 with multilib and java support. Hth, Andreas Btw, it would be great if you (@Curtis) could describe how you did the OpenJDK bootstrap. ------=_NextPart_000_018C_01D11558.BE6042E0 Content-Type: application/octet-stream; name="Bootstrap Setup Instructions" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Bootstrap Setup Instructions" This information is a compilation from numerous sources, but inspired by = the work of the Icedtea Team. After several failed attempts, with = varying results, to build the Icedtea Zero VM on FreeBSD 10=0A= =0A= Hardware: Apple PowerMac G5, 5GB RAM, 1TB Harddrive=0A= =0A= Software: FreeBSD 10.2, GCC5 w/GCJ=0A= =0A= To create a JDK bootstrap you need GCC with GCJ (Java) build. I = recommend GCC47, =0A= but any version at gcc45 or above should work. At the command prompt:=0A= =0A= Create bootstrap structure:=0A= =0A= mkdir -p /usr/local/bootstrap-openjdk/bin=0A= mkdir -p /usr/local/bootstrap-openjdk/lib=0A= mkdir -p /usr/local/bootstrap-openjdk/jre/lib=0A= mkdir -p /usr/local/bootstrap-openjdk/jre/lib/security=0A= =0A= Create symbolic links for java executables:=0A= =0A= cd /usr/local/bootstrap-openjdk=0A= ln -s /usr/local/bin/gcj5 javac=0A= ln -s /usr/local/bin/gij5 java=0A= ln -s /usr/local/bin/gjar5 jar=0A= ln -s /usr/local/bin/gjarsigner5 jarsigner=0A= ln -s /usr/local/bin/gjavah5 javah=0A= ln -s /usr/local/bin/gnative2ascii5 native2ascii=0A= =0A= Create symbolic links for java libraries:=0A= =0A= cd /usr/local/bootstrap-openjdk/lib=0A= ln -s /usr/local/share/classpath/tools.zip tools.jar=0A= =0A= cd /usr/local/bootstrap-openjdk/jre/lib=0A= ln -s /usr/local/share/classpath/glibj.zip rt.jar=0A= =0A= The GCJ java libraries should work for building JDK6, if want to build = JDK7 recommend =0A= you substitue the tools.jar and rt.jar libraries with libraries from a = Linux or =0A= other JDK6 distribution. Also copy "cacerts" file from this distribution = and place in the=0A= "/usr/local/bootstrap-openjdk/jre/lib/security" directory.=0A= =0A= Required build tools:=0A= =0A= GNU make=0A= CUPS and headers (cups-devel)=0A= libX11 and headers (libX11-devel)=0A= Freetype2 and headers (freetype-devel)=0A= patch=0A= sed=0A= unzip=0A= md5sum and sha256sum (FreeBSD files names are md5 and sha256 in /sbin. = Create sym links to md5sum and sha256sum in /sbin)=0A= wget=0A= alsa and headers=0A= xalan and xerces (bootstrapping only)=0A= GLib and GTK+ for the Gtk+ look and feel=0A= Ant >=3D 1.6.5=0A= libXp-devel=0A= libXtst-devel=0A= libXinerama-devel=0A= Automake 1.9=0A= libjpeg-devel >=3D 6b=0A= libpng-devel=0A= giflib-devel=0A= zlib-devel =0A= =0A= Optional symbolic links:=0A= =0A= ln -s /usr/local/bin/gappletviewer5 appletviewer=0A= ln -s /usr/local/bin/gkeytool5 keytool=0A= ln -s /usr/local/bin/gorbd5 orbd=0A= ln -s /usr/local/bin/grmic5 rmic=0A= ln -s /usr/local/bin/grmid5 rmid=0A= ln -s /usr/local/bin/grmiregistry5 rmiregistry=0A= ln -s /usr/local/bin/gserialver5 serialver=0A= ln -s /usr/local/bin/gtnameserv5 tnameserv=0A= =0A= Recommended build environment settings:=0A= =0A= setenv LANG C =0A= setenv ALT_JAVA_HOME /usr/local/bootstrap-openjdk=0A= setenv ALT_BOOTDIR /usr/local/bootstrap-openjdk=0A= setenv ALT_JDK_IMPORT_PATH /usr/local/bootstrap-openjdk=0A= setenv PLATFORM bsd =0A= setenv OS_FAMILY bsd =0A= setenv ARCH ppc =0A= setenv BUILDARCH ppc =0A= setenv LIBARCH ppc =0A= setenv ARCH_DATA_MODEL 64=0A= setenv ALT_FREETYPE_LIB_PATH /usr/local/lib =0A= setenv ALT_FREETYPE_HEADERS_PATH /usr/local/lib/libffi-3.2.1/include =0A= setenv ALT_CACERTS_FILE = /usr/local/bootstrap-openjdk/jre/lib/security/cacerts=0A= setenv LIBFFI_CFLAGS "-I/usr/local/lib/libffi-3.2.1/include"=0A= setenv DEFAULT_LIBPATH "/lib:/usr/lib:/usr/local/lib"=0A= setenv NO_DOCS true=0A= setenv BUILD_CORBA false=0A= setenv BUILD_JAXP false=0A= setenv BUILD_JAXWS false=0A= setenv ZERO_BUILD true=0A= setenv ZERO_ENDIANNESS big=0A= setenv ZERO_LIBARCH ppc=0A= setenv ZERO_ARCHDEF PPC=0A= setenv ZERO_ARCHFLAG "-mpowerpc64" =0A= setenv HOTSPOT_BUILD_JOBS 8 =0A= setenv PARALLEL_COMPILE_JOBS 8 =0A= setenv CC_INTERP true =0A= setenv OPENJDK true =0A= ------=_NextPart_000_018C_01D11558.BE6042E0--