Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Oct 2015 20:05:44 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-stable@freebsd.org
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   STABLE clang planned update MFC path (3.4.1 STABLE, 3.7.0, CURRENT) vs. powerpc64
Message-ID:  <7ABB859E-8321-48F7-885C-6667243C1388@dsl-only.net>

next in thread | raw e-mail | index | archive | help
On 2014-Oct-11 Dimitry Andric wrote:

> On 11 Oct 2015, at 14:05, Piotr Kubaj <pkubaj at riseup.net
> > wrote:
> >
> > AFAIK if there had been such plans, they were dropped long ago. The
> > reasoning it can't be done (at least for now) is that versions =
3.5.0+
> > require C++11-capable stack and that would break upgrades from =
9-STABLE
> > (if the user still uses GCC, as is by default). So, LLVM in =
stable/10
> > will probably be upgraded when stable/9 goes EOL.
>=20
>=20
> If stable/10 had clang 3.5 or higher, you could still upgrade from
> stable/9.  It would only require you to do the upgrade in two steps:
>=20
> * Rebuild and reinstall your stable/9 world using WITH_CLANG,
>   WITH_CLANG_IS_CC, and WITH_LIBCPLUSPLUS.  This will install clang
>   3.4.1 and libc++, and make clang the default compiler.
> * Checkout stable/10 (or even head), and build/install it in the =
regular
>   fashion.
>=20
> I am personally not against merging newer llvm/clang versions into
> stable/10.  But the "silent agreement" has always been that you could
> upgrade easily from the latest stable/X to stable/X+1, and the above
> two-step process breaks that, or at least makes it more complicated.
>=20
> Last but not least, note that this would only apply to the =
architectures
> that *can* actually build clang 3.4.1 and libc++ on stable/9.  This is
> currently limited to x86, little-endian arm and powerpc (64 bit, I'm
> unsure about 32 bit).
>=20
> -Dimitry

lib/csu/powerpc64/Makefile in head has updates and comments (2015-Feb-05 =
or so) about "powerpc64 csu needs to be built by gcc, so enforce that". =
It is tied to clang not supporting -mlongcall and "testing shows a clang =
linked with a [#] clang-built csu segfaults". The forcing of gcc use in =
head looks like:

CC:=3D            gcc
COMPILER_TYPE:=3D gcc

which is not in stable/10's variant.

stable/10 has a lib/csu/powerpc64/Makefile that does not force gcc but =
still has:

CFLAGS+=3D        -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include \
                -mlongcall

and so has -mlongcall in use on the command lines. Unless -mlongcall =
support used to be in place for clang and was later removed, a =
rebuilding of FreeBSD 9 or 10 that includes a lib/csu/powerpc64/ rebuild =
likely fails to build under WITH_CLANG_IS_CC.

I'm not sure about going all the way back to FreeBSD 9 but this suggests =
that clang was for some time --and recently has been-- insufficient on =
its own for reliable(?) powerpc64 builds (2015-Feb-05). It may be best =
to consider powerpc64 omitted from the "clang 3.4.1 and libc++" list in =
that last paragraph given the "upgrade easily" context intended.

(If there is an easy powerpc64 upgrade then I'd like to see notes about =
it: Other contexts might be able to use similar techniques. I started my =
explorations with 10.)

=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?7ABB859E-8321-48F7-885C-6667243C1388>