Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jan 2016 03:16:48 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Any notes on details what can be done for buildworld/buildkernel via clang/clang++ for powerpc64?
Message-ID:  <E60AEFCA-DE73-4F10-BE2B-73A978BB530A@dsl-only.net>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E60AEFCA-DE73-4F10-BE2B-73A978BB530A>