[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] build: Fix x86 build without EFI


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 16 Aug 2022 16:43:10 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Wei Chen <wei.chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 16 Aug 2022 15:43:43 +0000
  • Ironport-data: A9a23:gKmnhK8jXaAyIPLnnEo9DrUDS36TJUtcMsCJ2f8bNWPcYEJGY0x3y mcXUD2Oa/aLM2X1fIpwOdvlphwOvJLWytcxHFNurX88E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9z8kvU2xbuKUIPbePSxsThNTRi4kiBZy88Y0mYctitWia++3k YqaT/b3ZRn0gFaYDkpOs/jZ8EM24qyo0N8llgdWic5j7Qe2e0Y9VPrzFYnpR1PkT49dGPKNR uqr5NlVKUuAon/Bovv8+lrKWhViroz6ZGBiuVIPM0SWuTBQpzRa70oOHKF0hXG7Kdm+t4sZJ N1l7fRcQOqyV0HGsLx1vxJwS0mSMUDakVNuzLfWXcG7liX7n3XQL/pGU0sPZI4D18BNH2RQ5 c5JcHNVbxmlrrfjqF67YrEEasULKcDqOMUUu216zCGfBvEjKXzBa/yUv5kChm52350QW6aFD yYaQWMHgBDoahtTOlARGdQmkf2hnHXXeDxEslOF46Ew5gA/ySQhiOezbYSNILRmQ+1TuxaJn WDbpl2pAx0IF9u+8xfb6Emz07qncSTTB9tJSezQGuRRqFee3HAJARsaE16yu+Cki1WWUshab UcT/0IGk68280C6S8jnaDexqnWEox00VsJZFqsx7wTl4rrZ5UOVC3YJShZFacc6r4kmSDoyz FiLktj1Qzt1v9W9S2+Z97qShSO/P24SN2BqTS0OQBYB4tLjiJoulR+JRdFmeIaqg9yzEjH9x RiDti14jLIW5eYQzLmy913DhzOqp7DKQxQz6wGRWXiqhj6Vf6b8OdbuswKCq68dcsDJFTFto UToheDB5tlXDoqgshaTRfsdLuDxpK6EORv11AsH84Yay9i9x5KyVdkOvmkgfx01Y5tslSzBO xGK514IjHNHFD7zNPIsPdrsYyg/5fK4fekJQMw4eTanjnJZUAactB9jakeLt4wGuBh9yPpvU Xt3nCvFMJr7NUiE5GDvLwvl+eV3rh3SPEuKLXwB8zyp0KCFeFmeQqofPV2FY4gRtf3a+FiFo 4gHaZDRm32ztdEShQGGmbP/0HhQdSRrbXwIg5Y/mhG/zvpORzh6Vq65LUIJcI15haVF/tr1E oWGchYBkDLX2CyYQThmn1g5N9sDq74j8i9gVcHtVH70s0UejXGHtf1PKcNmLeh/nAGhpNYtJ 8Q4lwy7KqwnYlz6F/41MfERcKQKmMyXuD+z
  • Ironport-hdrordr: A9a23:uMFhsa3U3COiHU2KxySUJwqjBLAkLtp133Aq2lEZdPRUGvb4qy mLpoV96faUskd0ZJhOo7y90cW7Lk80sKQFh7X5Xo3SOTUO2lHYT72KhLGKq1aLdhEWtNQtt5 uIG5IOceEYZmIbsS+V2meFL+o=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Aug 16, 2022 at 03:02:10PM +0200, Jan Beulich wrote:
> On 16.08.2022 12:30, 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. And build both *stub.c as two different objects.
> > This mean we have to move some efi_compat_* aliases which are probably
> > useless for Arm.
> 
> These useless aliases want avoiding there imo. Already when the original
> series was discussed, I requested to avoid introduction of a file named
> common-stub.c or alike.

Yeah, I've notice that. This is why the build is broken under
specific condition.

> If names need to be different, can't we follow
> boot.c's model and introduce a per-arch efi/stub.h which stub.c would
> include at a suitable position (and which right now would be empty for
> Arm)?

That seems to be possible. But how is it better than having two
different source file? The only thing is to avoid exporting the
efi_compat_* symbol aliases. The downside is we would have another weird
looking not really header which is actually just part of a source file.
At least, "stub.c" and "stub.h" would be two different names, we just
change the extension rather than the basename.

Cheers,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.