From owner-freebsd-toolchain@freebsd.org Tue Jan 19 10:35:57 2016 Return-Path: Delivered-To: freebsd-toolchain@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 913B1A88EF5 for ; Tue, 19 Jan 2016 10:35:57 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-157.reflexion.net [208.70.211.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4486219B5 for ; Tue, 19 Jan 2016 10:35:56 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 10386 invoked from network); 19 Jan 2016 10:35:56 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 19 Jan 2016 10:35:56 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Tue, 19 Jan 2016 05:35:57 -0500 (EST) Received: (qmail 26723 invoked from network); 19 Jan 2016 10:35:57 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 19 Jan 2016 10:35:57 -0000 X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 13C8B1C43AE; Tue, 19 Jan 2016 02:35:54 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: clang 3.8.0 based powerpc (32 bit) buildworld runs on a PowerMac! Message-Id: Date: Tue, 19 Jan 2016 02:35:54 -0800 To: FreeBSD PowerPC ML , FreeBSD Toolchain Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 10:35:57 -0000 I now have an SSD that contains: 0) installkernel material from a gcc 4.2.1 based buildkernel 1) installworld material from a clang 3.8.0 based buildworld (clang 3.8.0, libc++, etc.) It boots and seems to be operating fine after booting --in both a G5 and = a G4 PowerMac. Apparently the clang code generation has been updated to not require an = explicit -mlongcall. I had to remove those since clang rejects them on = command lines. It linked without complaint (and later seems to be = running fine). (I've seen llvm review notes mentioning the "medium = model" or some phrase like that for powerpc.) (I've not been able to buildkernel yet for powerpc (non-64) from my = amd64 environment: rejected command lines for other issues. Thus the = current limitation to buildworld.) To get to (1) I did the following sort of sequence: (The first few steps deal with other issues in order to have sufficient = context.) A) Started by installing the latest powerpc (non-64) snapshot. ( = http://ftp1.freebsd.org/pub/FreeBSD/snapshots/ISO-IMAGES/11.0/FreeBSD-11.0= -CURRENT-powerpc-20160113-r293801-disc1.iso ) (I had to use a PowerMac with video hardware that vt would handle.) (Basic display, no X-windows involvement here.) B) Rebuild, including using my usual kernel configuration that has both vt and sc. I did this based on projects/clang380-import -r294201 /usr/src but still using gcc 4.2.1 (native on the PowerMac). The configuration turns off kernel debugging extras too. C) installkernel, installworld, etc., set to use sc instead of vt, and = rebooted. (As of this I could use the SSD in more PowerMacs by using sc instead = of vt via a /boot/loader.conf assignment.) D) dump/restore the file systems to another SSD (after partitioning it). Adjust the host name and the like on the copy. (This copy later ends up having new installworld materials overlaid.) E) In a projects/clang380-import -r294201 amd64 environment, buildworld = for TARGET_ARCH=3Dpowerpc . WITH_LIBCPLUSPLUS=3D and clang related = material built, gcc 4.2.1 related material not built. WITH_BOOT=3D as well. I choose WITHOUT_DEBUG=3D and WITHOUT_DEBUG_FILES=3D . (I've not tried = enabling them yet.) binutils is not from ports. F) Use DESTDIR=3D with installworld to an initially empty directory = tree. tar the tree. =20 G) Transfer the tar file to the PowerMac. Mount the to-be-updated SSD to /mnt and /mnt/var. After chflags -R noschg on /mnt and /mnt/var use tar xpf to replace things from the buildworld on /mnt and /mnt/var. (This does leave older gcc 4.2.1 related materials in place.) H) Dismounts, shutdown, and then boot from the updated SSD. Note: I've never manage to get powerpc64-xtoolchain-gcc/powerpc64-gcc to = produce working 32-bit code. So I've never gotten this far via that = path. =3D=3D=3D Mark Millard markmi at dsl-only.net