Re: [PATCH v4 07/30] libbpf: Initialize CFLAGS before including Makefile.include
From: Alexei Starovoitov
Date: Mon Mar 16 2026 - 10:17:35 EST
On Mon, Mar 16, 2026 at 3:18 AM Leo Yan <leo.yan@xxxxxxx> wrote:
>
> Hi BPF maintainers,
>
> On Wed, Mar 11, 2026 at 08:29:32AM +0000, Leo Yan wrote:
> > tools/scripts/Makefile.include may expand EXTRA_CFLAGS in a future
> > change. This could alter the initialization of CFLAGS, as the default
> > options "-g -O2" would never be set once EXTRA_CFLAGS is expanded.
> >
> > Prepare for this by moving the CFLAGS initialization before including
> > tools/scripts/Makefile.include, so it is not affected by the extended
> > EXTRA_CFLAGS.
> >
> > Append EXTRA_CFLAGS to CFLAGS only after including Makefile.include and
> > place it last so that the extra flags propagate properly and can
> > override the default options.
> >
> > Signed-off-by: Leo Yan <leo.yan@xxxxxxx>
>
> Before sending a new version, I'd check if you have a chance to review
> the libbpf patches. The libbpf change is crucial for this series.
>
> Another reason for pinging because I received a bpf-ci report about test
> failures for this series [1]. The failures looks to be unrelated, as
> the tests fail starting from the first patch, which is irrelevant to BPF
> code [2]. I tried reaching kernel-ci@xxxxxxxx last week but haven't
> received a response yet.
>
> If bpf-ci testing is mandatory for libbpf patches, could you advise me
> on the correct workflow (e.g., whether the patches should be based on a
> specific branch)?
yes. It is mandatory and libbpf patches must go through bpf-next tree,
so pls send them separately.