From: Bobby Eshleman <bobbyeshleman@gmail.com>
To: "Maxime Chevallier (Netdev Foundation)" <maxime.chevallier@bootlin.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] tools: ynl: Fix out-of-tree build for ynltool
Date: Thu, 10 Sep 2026 10:10:29 -0700 [thread overview]
Message-ID: <aqLkhcMb8uSKhQZl@devvm29614.prn0.facebook.com> (raw)
In-Reply-To: <20260909071155.1234922-1-maxime.chevallier@bootlin.com>
On Wed, Sep 09, 2026 at 09:11:54AM +0200, Maxime Chevallier (Netdev Foundation) wrote:
> After the blamed commit, running a out-of-tree build for ynltool fails :
>
> # make -C tools/net/ynl/ynltool O=/tmp/o1
> make: Entering directory 'tools/net/ynl/ynltool'
> make: *** No rule to make target '/tmp/o1/json_writer.o', needed by '/tmp/o1/ynltool'. Stop.
>
> ynltool's Makefile correctly accounts for $(OUTPUT) to get the list of
> object files to generate :
>
> OBJS := $(patsubst %.c,$(OUTPUT)%.o,$(SRCS))
>
> but it never actually set $(OUTPUT) before the blamed commit, meaning
> that out-of-tree buils of ynltool were always actually in-tree.
>
> Now, the O= parameter is correctly accounted for, and the %o: %c rule fails.
>
> Let's update the %o: %c rule to also use $(OUTPUT).
>
> Reported-by: Bobby Eshleman <bobbyeshleman@gmail.com>
> Closes: https://lore.kernel.org/all/aqCyWQxqKDuQnZYR@devvm29614.prn0.facebook.com/
> Fixes: 917f713b4ec4 ("tools: ynl: Allow cross-compiling ynl and associated tools")
> Signed-off-by: Maxime Chevallier (Netdev Foundation) <maxime.chevallier@bootlin.com>
> ---
> Targetting net-next, as the blamed commit lives there.
>
> tools/net/ynl/ynltool/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/net/ynl/ynltool/Makefile b/tools/net/ynl/ynltool/Makefile
> index b8c67cdb4fdf..1053e7606c86 100644
> --- a/tools/net/ynl/ynltool/Makefile
> +++ b/tools/net/ynl/ynltool/Makefile
> @@ -31,7 +31,7 @@ $(YNLTOOL): ../libynl.a $(OBJS)
> $(Q)echo -e "\tLINK $@"
> $(Q)$(CC) $(CFLAGS) -o $@ $(OBJS) ../libynl.a -lm
>
> -%.o: %.c ../libynl.a
> +$(OUTPUT)%.o: %.c ../libynl.a
> $(Q)echo -e "\tCC $@"
> $(Q)$(COMPILE.c) -MMD -c -o $@ $<
>
> --
> 2.55.0
>
Reviewed-by: Bobby Eshleman <bobbyeshleman@meta.com>
next prev parent reply other threads:[~2026-09-10 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260909071155.1234922-1-maxime.chevallier@bootlin.com>
2026-09-10 15:59 ` [PATCH net-next] tools: ynl: Fix out-of-tree build for ynltool Jakub Kicinski
2026-09-10 16:51 ` Maxime Chevallier
2026-09-10 17:10 ` Bobby Eshleman [this message]
2026-09-10 21:12 ` Maxime Chevallier
2026-09-10 21:16 ` Bobby Eshleman
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=aqLkhcMb8uSKhQZl@devvm29614.prn0.facebook.com \
--to=bobbyeshleman@gmail.com \
--cc=andrew+netdev@lunn.ch \
--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=maxime.chevallier@bootlin.com \
--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