HEADS UP: sparc64 backend for llvm/clang imported

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 28 Feb 2014 20:22:06 +0100
Hi,

In r262613 I have merged the clang-sparc64 branch back to head.  This
imports an updated sparc64 backend for llvm and clang, allowing clang to
bootstrap itself on sparc64, and to completely build world.  To be able
to build the GENERIC kernel, there is still one patch to be finalized,
see below.

If you have any sparc64 hardware, and are not afraid to encounter rough
edges, please try out building and running your system with clang.  To
do so, update to at least r262613, and enable the following options in
e.g. src.conf, or in your build environment:

WITH_CLANG=y
WITH_CLANG_IS_CC=y
WITH_LIBCPLUSPLUS=y  (optional)

Alternatively, if you would rather keep gcc as /usr/bin/cc for the
moment, build world using just WITH_CLANG, enabling clang to be built
(by gcc) and installed.  After installworld, you can then set CC=clang,
CXX=clang++ and CPP=clang-cpp for building another world.

For building the sparc64 kernel, there is one open issue left, which is
that sys/sparc64/include/pcpu.h uses global register variables, and this
is not supported by clang.  A preliminary patch for this is attached,
but it may or may not blow up your system, please beware!

The patch changes the pcpu and curpcb global register variables into
inline functions, similar to what is done on other architectures.
However, the current approach is not optimal, and the emitted code is
slightly different from what gcc outputs.  Any improvements to this
patch are greatly appreciated!

Last but not least, thanks go out to Roman Divacky for his work with
llvm/clang upstream in getting the sparc64 backend into shape.

-Dimitry



Received on Fri Feb 28 2014 - 18:22:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:47 UTC