All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Mykola Lysenko <nickolay.lysenko@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
	andrii@kernel.org, 	martin.lau@linux.dev, song@kernel.org,
	yonghong.song@linux.dev, jolsa@kernel.org, 	memxor@gmail.com
Subject: Re: [RFC PATCH bpf-next v5 8/8] selftests/bpf: build each test runner instance in its own sub-make
Date: Mon, 24 Aug 2026 11:37:12 -0700	[thread overview]
Message-ID: <1667c9542f7ef67ed970c1825de87d16f90c9ee7.camel@gmail.com> (raw)
In-Reply-To: <CAMtxOX3KFvfvbYOLB9WqbrxBhi=k8J5eXGs1wE0peg24CdAQiw@mail.gmail.com>

On Sat, 2026-08-22 at 17:34 -0700, Mykola Lysenko wrote:

...

> > > -# Define test_progs BPF-GCC-flavored test runner.
> > >  ifneq ($(BPF_GCC),)
> > > -TRUNNER_BPF_BUILD_RULE := GCC_BPF_BUILD_RULE
> > > -TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(call get_sys_includes,gcc,)
> > > -$(eval $(call DEFINE_TEST_RUNNER,test_progs,bpf_gcc))
> > > +# Sys includes come from the *host* gcc, not $(BPF_GCC) - bpf-gcc's own
> > > +# search path lacks the host's asm-generic/ headers.
> > > +GCC_SYS_INCLUDES := $(call get_sys_includes,gcc,)
> > > +
> > > +$(OUTPUT)/test_progs-bpf_gcc: $(RUNNER_PREREQS) FORCE
> > > +     +$(Q)$(RUNNER_MAKE) RUNNER=test_progs FLAVOR=bpf_gcc TESTS_DIR=prog_tests \
> > > +             BPF_CC='$(BPF_GCC)' BPF_CC_MSG=GCC-BPF                          \
> > > +             BPF_SYS_INCLUDES='$(GCC_SYS_INCLUDES)'                          \
> > > +             BPF_CC_FLAGS='-DBPF_NO_PRESERVE_ACCESS_INDEX -Wno-attributes -O2'
> > >  endif
> > 
> > Did you test the bpf_gcc flavor?
> > I have a recipe to build the toolchain somewhere, if you need it.
> 
> Two data points. The BPF CI GCC-BPF job builds the flavor and is
> green on this series. Locally I ran it with the bpf-gcc Ubuntu
> packages (gcc 14 snapshot, 2024): the machinery works - 671 of 982
> programs compile, the ones that old gcc cannot handle skip cleanly
> under BPF_STRICT_BUILD=0, skeletons generate or skip with the
> objects - until resolve_btfids aborts on btf_data.bpf.o carrying no
> .BTF section, which that gcc does not emit; the BTFIDS recipe step is
> not covered by the permissive suffix in the current Makefile either,
> so the behavior matches stock. I would take your toolchain recipe -
> with a current gcc-bpf I expect the flavor to complete, and I'd like
> it in my pre-send checklist.

#!/bin/bash

set -e

base=/home/ezingerman/gcc-bpf-toolchain
build_base=$base/build
gcc_repo=$base/gcc
gcc_build_dir=$build_base/gcc
binutils_repo=$base/binutils-gdb
binutils_build_dir=$build_base/binutils
install_dir=$base/install

mkdir -p $gcc_build_dir $binutils_build_dir

cd $binutils_build_dir
$binutils_repo/configure --target=bpf-unknown-none --prefix=$install_dir --disable-gdb
make -j
make install

export PATH="$install_dir/bin:$PATH"

cd $gcc_build_dir
$gcc_repo/configure --target=bpf-unknown-none --prefix=$install_dir --enable-languages=c,lto --disable-multilib
make -j
make install

      reply	other threads:[~2026-08-24 18:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 17:01 [RFC PATCH bpf-next v5 0/8] selftests/bpf: restructure the Makefile as a layered build Mykola Lysenko
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 1/8] selftests/bpf: keep headers off the generic link command line Mykola Lysenko
2026-08-05 21:21   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 2/8] selftests/bpf: drop stale and no-op lines Mykola Lysenko
2026-08-05 21:28   ` Eduard Zingerman
2026-08-06  4:43     ` Mykola Lysenko
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 3/8] selftests/bpf: factor the permissive-mode skip suffix into a helper Mykola Lysenko
2026-08-04 17:21   ` sashiko-bot
2026-08-05  0:13     ` Mykola Lysenko
2026-08-05 21:33   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 4/8] selftests/bpf: generate the signing key and certificate once Mykola Lysenko
2026-08-05 22:03   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 5/8] selftests/bpf: generate verifier/tests.h in a regular recipe Mykola Lysenko
2026-08-05 22:11   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 6/8] selftests/bpf: extract BPF skeleton generation into a helper script Mykola Lysenko
2026-08-04 17:59   ` sashiko-bot
2026-08-05  1:40     ` Mykola Lysenko
2026-08-05 22:39   ` Eduard Zingerman
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 7/8] selftests/bpf: move shared build definitions into Makefile.buildvars Mykola Lysenko
2026-08-05 23:34   ` Eduard Zingerman
2026-08-06  4:51     ` Mykola Lysenko
2026-08-04 17:01 ` [RFC PATCH bpf-next v5 8/8] selftests/bpf: build each test runner instance in its own sub-make Mykola Lysenko
2026-08-06  8:02   ` Eduard Zingerman
2026-08-06 18:30     ` Eduard Zingerman
2026-08-23  0:37       ` Mykola Lysenko
2026-08-23  0:34     ` Mykola Lysenko
2026-08-24 18:37       ` Eduard Zingerman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1667c9542f7ef67ed970c1825de87d16f90c9ee7.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=nickolay.lysenko@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.