Re: [RFC PATCH bpf-next v5 1/8] selftests/bpf: keep headers off the generic link command line

Eduard Zingerman <[email protected]>
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
On Tue, 2026-08-04 at 10:01 -0700, Mykola Lysenko wrote:
> The generic '$(OUTPUT)/%:%.c' rule links with '$(LINK.c) $^', so
> every prerequisite of such a binary lands on the compiler driver's
> command line. That only works while none of them is a header: gcc
> tolerates a stray .h argument on a link line, but clang treats it as
> a request to precompile the header and fails with "cannot specify -o
> when generating multiple output files".
> 
> Filter headers out of the recipe, with a comment: header
> prerequisites on these targets are useful for dependency tracking -
> the next patch declares one - and the constraint is easy to
> rediscover the hard way.
> 
> Signed-off-by: Mykola Lysenko <[email protected]>
> ---

Acked-by: Eduard Zingerman <[email protected]>

...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.