On Thu, Dec 9, 2021 at 5:59 AM Kamil Dziezyk <[email protected]> wrote:

> Xen build may fail for arm machines that have enabled extra flags,
> that can be enabled only for specific architecture version, e.g. armv8-2a.
>

Apologies for being slow to review this one.

>From looking at "bitbake -e xen" for an example Raspberry Pi 4 aarch64
build configuration, the major variables that this affects looks like: CPP,
CXX and EXTRA_CFLAGS_XEN_TOOLS.
So is it the xen recipe or the xen-tools recipe that this patch is intended
to fix the build for? (or both?)

I can't immediately tell what compilation this fixes, but: I think that
this change is probably OK for the hypervisor case, since TUNE_CCARGS is
already excluded from the definition of CC for aarch64 for the hypervisor
build, but for the tools it will affect the compiler flags, so:

Do you really intend to drop all "-mcpu" and "-march" C compiler flags from
the Xen tools build, for any aarch64 MACHINEs? Should your MACHINEs
actually populate TUNE_CCARGS with those flags if they are not wanted for
userspace software? -- or is there a problem that is specifically being
encountered with the Xen tools software build? If so, I'd like to know a
bit more about that -- and then this workaround may be OK if we can confirm
that it doesn't negatively affect the MACHINEs that we care about, which
include QemuArm64 and the Rpi4 as a reference platform.

As an aside, I would like to remove the similar x86 logic from this recipe
where TUNE_CCARGS is cleared to address the hvmloader build, and fix that
in a better way. (That will be separate to this work.)

The comment that is being added refers to "HVM-mode": is that term still
accurate for Xen on Arm?

The subject line for this patch should indicate both "xen" and "xen-tools",
since this modifies xen.inc which is included by both recipes. I would
encourage you to CC both myself and Doug on future posts of Xen-related
patches, please.

thanks

Christopher



>
> Signed-off-by: Kamil Dziezyk <[email protected]>
> ---
>  recipes-extended/xen/xen.inc | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
> index d3c7a7d..9ac82ef 100644
> --- a/recipes-extended/xen/xen.inc
> +++ b/recipes-extended/xen/xen.inc
> @@ -102,6 +102,11 @@ EXTRA_CFLAGS_XEN_CORE="${DEBUG_PREFIX_MAP}"
>  #   EXTRA_CFLAGS_XEN_TOOLS: so clear TUNE_CCARGS on x86 to prevent that.
>  TUNE_CCARGS:x86-64=""
>
> +# - The Xen build for aarch64 systems with HVM-mode enabled may include
> +#   architecture specific flags '-march=*' which causes build failure, so
> clear
> +#   TUNE_CCARGS on aarch64 to prevent that.
> +TUNE_CCARGS:aarch64=""
> +
>  # - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then
> passes the
>  #   optimization -O via C*FLAGS which is problematic when the CFLAGS are
> cleared
>  #   within the build because compilation fails with the compiler stating
> --
> 2.17.1
>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6984): 
https://lists.yoctoproject.org/g/meta-virtualization/message/6984
Mute This Topic: https://lists.yoctoproject.org/mt/87611981/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to