|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v3] build: Fix x86 out-of-tree build without EFI
On 19.09.2022 12:28, Anthony PERARD wrote:
> We can't have a source file with the same name that exist in both the
> common code and in the arch specific code for efi/. This can lead to
> confusion in make and it can pick up the wrong source file. This issue
> lead to a failure to build a pv-shim for x86 out-of-tree, as this is
> one example of an x86 build using the efi/stub.c.
>
> The issue is that in out-of-tree, make might find x86/efi/stub.c via
> VPATH, but as the target needs to be rebuilt due to FORCE, make
> actually avoid changing the source tree and rebuilt the target with
> VPATH ignored, so $@ lead to the build tree where "stub.c" doesn't
> exist yet so a link is made to "common/stub.c".
>
> Rework the new common/stub.c file to have a different name than the
> already existing one, by renaming the existing one. We can hide the
> compat aliases that x86 uses behind CONFIG_COMPAT so a Arm build will
> not have them.
>
> Also revert the change to the rule that creates symbolic links it's
> better to just recreate the link in cases where an existing file exist
> or the link goes to the wrong file.
>
> Avoid using $(EFIOBJ-y) as an alias for $(clean-files), add
> "stub.c" directly to $(clean-files).
>
> Also update .gitignore as this was also missing from the original
> patch.
>
> Fixes: 7f96859b0d00 ("xen: reuse x86 EFI stub functions for Arm")
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with a remark and one more adjustment:
> ---
>
> Notes:
> v3:
> - back to using common-stub.c
As said in person, I'm a little puzzled by this, as the v2 discussion
had no hint in that direction.
> --- a/.gitignore
> +++ b/.gitignore
> @@ -280,6 +280,7 @@ xen/arch/*/efi/ebmalloc.c
> xen/arch/*/efi/efi.h
> xen/arch/*/efi/pe.c
> xen/arch/*/efi/runtime.c
> +xen/arch/*/efi/common-stub.c
> xen/arch/*/include/asm/asm-offsets.h
> xen/common/config_data.S
> xen/common/config.gz
The new line wants inserting a few lines further up, to retain sorting.
Can perhaps be done while committing.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |