Re: [PATCH net-next 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check

From: Maxime Chevallier

Date: Tue Sep 01 2026 - 16:46:24 EST


Hi Matthieu,

On 9/1/26 19:24, Matthieu Baerts wrote:
> Hi Maxime,
>> +# Set CC for the io_uring check
>> +CC := $(CROSS_COMPILE)gcc
>
> Could we have something similar to
> tools/testing/selftests/riscv/cfi/Makefile:
>
> # Set CC for the io_uring check done before including lib.mk
> ifeq ($(LLVM)$(CC),cc)
> CC := $(CROSS_COMPILE)gcc
> endif
>
> WDYT?

Ah this is better indeed IMO, I'll use that in V2 then, thanks for
the tips.

Initially I considered doing a larger rework of extracting the logic
in lib.mk that sets CC to the right value base on CROSS_COMPILE, LLVM
and ARCH into a dedicated .mk file that we would include at the top,
but at that time it seemed to be too big of a rework for just the
io_uring check.

It lead to some headache about double-inclusions and relative paths lookups
that far exceeded my Makefile skills :(

Thanks for the review,

Maxime