Re: [PATCH v2] tools/sched_ext: Improve cross-compilation support in Makefile
From: Eric yang
Date: Tue Apr 15 2025 - 21:24:53 EST
Okay, v1 works well. I misunderstood your intentions last time. Please
disregard v2.
Thanks
Eric
Tejun Heo <tj@xxxxxxxxxx> 于2025年4月15日周二 22:57写道:
>
> On Tue, Apr 15, 2025 at 01:46:42PM +0800, yangsonghua wrote:
> > Modify the tools/sched_ext/Makefile to better handle cross-compilation
> > environments by:
> >
> > 1. Adjusted `HOST_OUTPUT_DIR` to be relative to `$(OBJ_DIR)`, ensuring
> > correct path handling during host tool building when cross-compile
> > (HOST_OUTPUT_DIR now points to $(OBJ_DIR)/host-tools)
> > 2. Properly propagate CROSS_COMPILE to libbpf sub-make invocation
> > 3. Add missing $(HOST_BPFOBJ) build rule with proper host toolchain flags
> > (ARCH=, CROSS_COMPILE=, explicit HOSTCC/HOSTLD)
> > 4. Consistently quote $(HOSTCC) in bpftool build rule
> >
> > The changes ensure proper cross-compilation behavior while maintaining
> > backward compatibility with native builds. Host tools are now correctly
> > built with the host toolchain while target binaries use the cross-toolchain.
> >
> > Signed-off-by: yangsonghua <yangsonghua@xxxxxxxxxxx>
>
> I already applied v1, so please send the updates as incremental changes
> atop.
>
> Thanks.
>
> --
> tejun