On 17/08/2022 12:02, Andrew Cooper wrote:
> On 17/08/2022 10:15, 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
>> comfusion 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" dosen'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 will take
>> example of efi/boot.c and have the common stub.c include a per-arch
>> stub.h. This at least avoid the need to expose to Arm both alias
>> efi_compat_get_info and efi_compat_runtime_call.
>>
>> 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.coop...@citrix.com>
>> Signed-off-by: Anthony PERARD <anthony.per...@citrix.com>
> This version is broken I'm afraid.

No it's not.  User error on my behalf.  Sorry.

Tested-by: Andrew Cooper <andrew.coop...@citrix.com>

Reply via email to