From owner-freebsd-ppc@freebsd.org Wed Jan 13 11:16:58 2016 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 11853A816CE for ; Wed, 13 Jan 2016 11:16:58 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-4.reflexion.net [208.70.210.4]) (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 BBB441DD5 for ; Wed, 13 Jan 2016 11:16:56 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 28849 invoked from network); 13 Jan 2016 11:16:59 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 13 Jan 2016 11:16:59 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Wed, 13 Jan 2016 06:16:52 -0500 (EST) Received: (qmail 31836 invoked from network); 13 Jan 2016 11:16:52 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 13 Jan 2016 11:16:52 -0000 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 779B91C43AE for ; Wed, 13 Jan 2016 03:16:48 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Any notes on details what can be done for buildworld/buildkernel via clang/clang++ for powerpc64? Message-Id: Date: Wed, 13 Jan 2016 03:16:48 -0800 To: FreeBSD PowerPC ML Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) 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: Wed, 13 Jan 2016 11:16:58 -0000 I've been experimenting some with base/projects/clang380-import , = cortex-a7 arm (rpi2b) and amd64 so far. I'm unsure what to do relative = to a basic check on powerpc64 (or powerpc if that was possible). Anyone willing to send out notes on techniques/known-status for = buildworld/buildkernel via clang/clang++ for powerpc64 (or powerpc)? = Native? Via amd64? src.conf content? Other "adjustments" to /usr/src/ ? = How much of the build can be clang/clang++ based? My initial powerpc64 context: I have 11.0-CURRENT powerpc64 operational via using devel/powerpc64-gcc = (native) as the system compiler with WITH_LIBCPLUSPLUS=3D , clang 3.7.1 = built but not used, no gcc 4.2.1 built. (lib32 builds but fails to work = due to the crtbeginS.o content produced and then used: segmentation = fault in _init.) # freebsd-version -ku; uname -aKU 11.0-CURRENT 11.0-CURRENT FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #9 r293632M: Sun Jan = 10 12:47:56 PST 2016 = markmi@FBSDG5C0:/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/sys/GENERIC6= 4vtsc-NODEBUG powerpc 1100093 1100093 So I could experiment from a native powerpc64 context that initially = includes clang 3.7.1, libc++, and lang/powerpc64, other than lib32 = contexts. (Also present: lang/gcc49 and lang/gcc5 but with 32-bit = support disabled.) One odd point that I'm aware exists is that = /usr/src/lib/csu/powerpc64/Makefile forces: CC:=3D gcc COMPILER_TYPE:=3D gcc In my context this Makefile uses the powerpc64-gcc compiler currently. = I've also have 3 /usr/src/sys/boot/*/Makefile.inc sources that use = "-Wl,-m -Wl,elf32ppc_fbsd" in LDFLAGS in powerpc64 specific places = instead of "-m elf32ppc_fbsd". Because the powerpc64 machines I have access to are PowerMac G5's, I = have also my change that avoids the mtsprg0 in = /usr/src/sys/powerpc/ofw/ofw_machdep.c in order for G5 booting to be = reliable. Because of the reliable booting issue for G5's I try to avoid = using standard FreeBSD installers (.iso's and the like). I build a kernel that has both vt and sc (but not ps3). In /usr/src/contrib/libcxxrt/guard.cc I've commented out the use of the = C11 notation for a static assertion because it is rejected by = powerpc64-gcc. I've never dealt with the Big Endian vs. Little Endian UFS file system = incompatibility issue as far as cross installing from amd64 goes. (For = the rpi2b I just plug in the media to an amd64 FreeBSD 11.0-CURRENT = context, mount it to /mnt, and use DESTDIR=3D/mnt (make) and -D /mnt = (mergemaster) during install activities.) My powerpc (non-64) contexts are way out of date. I'd have research to = do just to get them up to date, such as being based on a fairly modern = libc++. =3D=3D=3D Mark Millard markmi at dsl-only.net