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

Re: [PATCH] tests/vpci: Use $(CC) instead of $(HOSTCC)



On Tue, Jun 03, 2025 at 08:52:38AM +0200, Orzel, Michal wrote:
> 
> 
> On 03/06/2025 08:46, Roger Pau Monné wrote:
> > On Mon, Jun 02, 2025 at 05:09:29PM +0200, Michal Orzel wrote:
> >> These tests are supposed to run on target. HOSTCC can be different than
> >> CC (when cross-compiling). At the moment, tests installation would put
> >> a binary of a wrong format in the destdir.
> >>
> >> Fixes: e90580f25bd7 ("vpci: introduce basic handlers to trap accesses to 
> >> the PCI config space")

Hm, it's unclear to me whether this is the correct fixes tag.
Previous to:

96a587a05736 tools/tests: Add install target for vPCI

The test was not installed on the host, and hence didn't need to use
CC instead of HOSTCC (or at least that's my understating).

> >> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
> >> ---
> >>  tools/tests/vpci/Makefile | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/tools/tests/vpci/Makefile b/tools/tests/vpci/Makefile
> >> index 9450f7593a41..1101a669e118 100644
> >> --- a/tools/tests/vpci/Makefile
> >> +++ b/tools/tests/vpci/Makefile
> >> @@ -11,7 +11,7 @@ run: $(TARGET)
> >>    ./$(TARGET)
> >>  
> >>  $(TARGET): vpci.c vpci.h list.h main.c emul.h
> >> -  $(HOSTCC) $(CFLAGS_xeninclude) -g -o $@ vpci.c main.c
> >> +  $(CC) $(CFLAGS_xeninclude) -g -o $@ vpci.c main.c
> > 
> > This was already posted in:
> > 
> > https://lore.kernel.org/xen-devel/20230313121226.86557-1-roger.pau@xxxxxxxxxx/
> > 
> > And got no feedback.
> > 
> > I'm happy for your change to go in, but you might also consider
> > picking up the run target adjustment part of that previous patch.
> You're the maintainer of this file. You should tell me what I need to do
> unless you want to wait for Anthony feedback.

I would also add the chunk to adjust the run target if you use CC
instead of HOSTCC.

Thanks, Roger.



 


Rackspace

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