Netdev List
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Bobby Eshleman <bobbyeshleman@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Donald Hunter <donald.hunter@gmail.com>,
	Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>,
	matttbe@kernel.org, Stanislav Fomichev <sdf@fomichev.me>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/2] tools: ynl: Allow cross-compiling ynl and associated tools
Date: Wed, 9 Sep 2026 09:01:52 +0200	[thread overview]
Message-ID: <bdb11b67-60c4-4014-a38e-dbe4aa98cc53@bootlin.com> (raw)
In-Reply-To: <aqCyWQxqKDuQnZYR@devvm29614.prn0.facebook.com>

Hi,

On 9/9/26 03:11, Bobby Eshleman wrote:
> On Mon, Sep 07, 2026 at 06:14:35PM +0200, Maxime Chevallier (Netdev Foundation) wrote:
>> The ynl tool and libraries may be built standalone or through the
>> drivers/net/hw selftest machinery. This may target a different arch, so
>> we need to take the CROSS_COMPILE variable into account for LLVM and
>> gcc.
>>
>> Let's include the tools/scripts/Makefile.include that deals with the
>> CC/AR resolution.
>>
>> Fixup the ynltool CFLAGS handling to use +=, so that we don't override
>> the ones set in Makefile.include.
>>
>> Makefile.include also sets the Q variable for verbose mode, so we can
>> drop it from the ynltool Makefile. This will allow properly selection
>> the verbosity of ynltool builds with the V=1 make flag.
>>
>> Reviewed-by: Matthieu Baerts (Netdev Foundation) <matttbe@kernel.org>
>> Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com>
> 
> Hey Maxime,
> 
> It seems that this patch may break some invocations of make:
> 
>   # make -C tools/net/ynl/ynltool O=/tmp/o1
>   make: Entering directory '/data/users/bobbyeshleman/linux-worktrees/review/tools/net/ynl/ynltool'
>   make: *** No rule to make target '/tmp/o1/json_writer.o', needed by '/tmp/o1/ynltool'.  Stop.
>   make: Leaving directory '/data/users/bobbyeshleman/linux-worktrees/review/tools/net/ynl/ynltool'
> 

Indeed, but looks like the command you're mentionning never worked as expected in the
first place, passing O=/tmp/xxx triggers the bug, but before the patch, O=/tmp/xxx
just does nothing, out-of-tree build just never worked for ynltool :

Before this patch :

$ make -C tools/net/ynl/ynltool O=/tmp/o1 V=1 
make: Entering directory '/home/mchevallier/work/netdev/linux/tools/net/ynl/ynltool'
	CC json_writer.o
	CC main.o
	CC page-pool.o
	CC qstats.o
	LINK ynltool
make: Leaving directory '/home/mchevallier/work/netdev/linux/tools/net/ynl/ynltool'
$ ls /tmp/o1/
$

The fix is simple though:

-%.o: %.c ../libynl.a
+$(OUTPUT)%.o: %.c ../libynl.a

I'll send the followup rightaway.

Side-note, out-of-tree build doesn't work for other ynl tools and utilities, but at least
trying to do so doesn't error-out.

Thanks for the report,

Maxime


  reply	other threads:[~2026-09-09  7:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 16:14 [PATCH net-next v3 0/2] selftests: drv-net: Allow cross-compiling the hardware tests Maxime Chevallier (Netdev Foundation)
2026-09-07 16:14 ` [PATCH net-next v3 1/2] tools: ynl: Allow cross-compiling ynl and associated tools Maxime Chevallier (Netdev Foundation)
2026-09-08 16:17   ` netdev-bot+sashiko
2026-09-09  1:11   ` Bobby Eshleman
2026-09-09  7:01     ` Maxime Chevallier [this message]
2026-09-07 16:14 ` [PATCH net-next v3 2/2] selftests: drv-net: Use cross-compilation environment for the io_uring check Maxime Chevallier (Netdev Foundation)
2026-09-08 16:17   ` netdev-bot+sashiko
2026-09-09  0:30 ` [PATCH net-next v3 0/2] selftests: drv-net: Allow cross-compiling the hardware tests patchwork-bot+netdevbpf
2026-09-09  0:30 ` Jakub Kicinski

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=bdb11b67-60c4-4014-a38e-dbe4aa98cc53@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bobbyeshleman@gmail.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shuah@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox