Re: Compiling Xen on FreeBSD using clang ...

From: Marcin Cieslak <saper_at_saper.info>
Date: Sun, 19 Oct 2014 20:03:24 +0000 (UTC)
On Sun, 19 Oct 2014, Matthew Grooms wrote:

> All,
>
> As most of you are probably aware, Roger at Citrix R&D has been doing some 
> incredible work to bring PVH domU/dom0 support to FreeBSD. There has also 
> been an effort by other Xen developers to get the software to compile using 
> clang. While most of these attempts appear to be on Linux platforms targeting 
> arm processors, the FreeBSD version of binutils is quite a bit older. Clang 
> still can't parse all of the assembly that Xen requires, so unfortunately the 
> -no-integrated-as option has to be used in several cases.
>
> Which brings me to my question, is there a way to ask clang to use the ports 
> version of binutils when -no-integrated-as is passed to clang? The version of 
> 'as' in base fails to compile such as ...
>
> /tmp/misc-bf1339.s: Assembler messages:
> /tmp/misc-bf1339.s:375: Error: unknown pseudo-op: `.cfi_sections'

I have recently managed to compile Xen (4.5 unstable from git master) using
few patches in the source code (I posted them to xen-devel_at_, most of them
are almost the same as some earlier work by Julien Grall).

I have used clang version 3.5.0 (trunk) from ports just for the .code16
support, other than that clang 3.4.1 was fine.

Xen kernel compiled this way even boots successfully and starts Debian dom0.

This command was used to compile with 3.4.1 (without hvmloader):
env CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib gmake clang=y CC=clang-devel HOSTCC=clang-devel CONFIG_SEABIOS=y CONFIG_HVMLOADER=n SEABIOS_PATH=$HOME/qemu/bios.bin-1.7.5 CONFIG_QEMU=n "$_at_"


//Marcin
Received on Sun Oct 19 2014 - 18:03:30 UTC

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