On Thu, Apr 18, 2019 at 07:33:05PM +0100, Julien Grall wrote:
> (+ Roger)
> 
> On 18/04/2019 12:15, Artem Mygaiev wrote:
> > Hi Julien
> > 
> > On Thu, 2019-04-18 at 11:43 +0100, Julien Grall wrote:
> > > On 18/04/2019 10:15, Artem Mygaiev wrote:
> > > > Hello Julien, Stefano
> > > 
> > > Hi Artem,
> > > 
> > > > On Wed, 2019-04-17 at 10:42 +0100, Julien Grall wrote:
> > > > > Hi,
> > > > > 
> > > > > On 16/04/2019 23:43, Stefano Stabellini wrote:
> > > > > > On Fri, 29 Mar 2019, Julien Grall wrote:
> > > > > > > On 28/03/2019 11:27, Artem Mygaiev wrote:
> > > > > > > > Hi Julien,
> > > > > > > 
> > > > > > > Hi Artem,
> > > > > > > 
> > > > > > > > On Wed, 2019-03-27 at 18:45 +0000, Julien Grall wrote:
> > > > > > > > > Hi all,
> > > > > > > > > 
> > > > > > > > > This series adds support to build Xen Arm with clang.
> > > > > > > > > This series was
> > > > > > > > > tested
> > > > > > > > > with clang 8.0.
> > > > > > > > > 
> > > > > > > > > Note that I only did build for arm64. I still need to
> > > > > > > > > look at the arm32
> > > > > > > > > build.
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > I wonder if you have time to try the series with Arm
> > > > > > > > Compiler 6? I am
> > > > > > > > asking because AFAIK it is based on clang/llvm [1] and
> > > > > > > > there's a
> > > > > > > > safety-compliant version of it certified by TUV [2]. I
> > > > > > > > don't have a
> > > > > > > > license yet so cannot try it myself but maybe you have
> > > > > > > > access.
> > > > > > > 
> > > > > > > I gave a quick try to the Arm Compiler. I had to hack a bit
> > > > > > > config/StdGNU.mk
> > > > > > > to pass armclang and the appropriate target option.
> > > > > > > 
> > > > > > > I also had a linking issue at the end where __2snprintf was
> > > > > > > not found. It
> > > > > > > seems the compiler replace snprintf with __2snprintf, I
> > > > > > > haven't figured out
> > > > > > > why yet.
> > > > > > 
> > > > > > But after these changes, does it work?
> > > > > 
> > > > > I haven't tried to fix the linking issues. I only gave a quick
> > > > > try because Artem
> > > > > asked. I have no plan at the moment to go further than that for
> > > > > now.
> > > > > 
> > > > > Patches are welcomed to add support for armclang.
> > > > > 
> > > > 
> > > > I have implemented a bunch of HACKs [1] so can build Xen master
> > > > with
> > > > armclang 6.12. Not even "smoke"-tested, just trying to identify
> > > > missing
> > > > parameters and proper linker configuration.
> > > 
> > > Thank you for looking at it. Some comments below.
> > > 
> > > > Not yet fixed section placement, lots of warnings from linker like:
> > > > Warning: L6170W: Mapping symbol #40 '$x.20' in
> > > > .altinstr_replacement(ns16550.o:42) identifies code, but is in a
> > > > section not marked as executable.
> > > 
> > > Instruction in the sections .altinstr_replacement are never meant to
> > > be executed.
> > > 
> > > I guess this is coming from armlink? Any particular reason to use
> > > armlink and
> > > not ld as we do on clang?
> > > 
> > 
> > Yes, armlink has a "Safety-certified" version of it, while ld doesn't,
> > unfortunately :(
> 
> I am not sure if anyone tried to build Xen other than with ld so far. I have
> CCed Roger who might have a clue whether there are other blocker.

On x86 you can build Xen and the toolstack with a full llvm based
toolchain (clang + lld). In fact that's how the Xen packages for
FreeBSD are built, IIRC lld and clang 6 and greater should work fine
with Xen 4.12 and upwards.

I had to do some fixes to lld and clang in order to understand some of
the assembly tricks that Xen does, but it was quite minor.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to