* [PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
@ 2025-06-06 5:23 Suleiman Souhlal
2025-06-06 5:36 ` [RESEND][PATCH] " Suleiman Souhlal
0 siblings, 1 reply; 7+ messages in thread
From: Suleiman Souhlal @ 2025-06-06 5:23 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
Suleiman Souhlal, stable
When cross compiling the kernel with clang, we need to override
CLANG_CROSS_FLAGS when preparing the step libraries for
resolve_btfids.
Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
when building tools in parallel"), MAKEFLAGS would have been set to a
value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
fact that we weren't properly overriding it.
Cc: stable@vger.kernel.org
Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
Signed-of-by: Suleiman Souhlal <suleiman@google.com>
---
tools/bpf/resolve_btfids/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile
index afbddea3a39c..ce1b556dfa90 100644
--- a/tools/bpf/resolve_btfids/Makefile
+++ b/tools/bpf/resolve_btfids/Makefile
@@ -17,7 +17,7 @@ endif
# Overrides for the prepare step libraries.
HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \
- CROSS_COMPILE="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
+ CROSS_COMPILE="" CLANG_CROSS_FLAGS="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
RM ?= rm
HOSTCC ?= gcc
--
2.50.0.rc0.642.g800a2b2222-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND][PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
2025-06-06 5:23 [PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang Suleiman Souhlal
@ 2025-06-06 5:36 ` Suleiman Souhlal
2025-06-06 6:05 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Suleiman Souhlal @ 2025-06-06 5:36 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
Suleiman Souhlal, stable
When cross compiling the kernel with clang, we need to override
CLANG_CROSS_FLAGS when preparing the step libraries for
resolve_btfids.
Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
when building tools in parallel"), MAKEFLAGS would have been set to a
value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
fact that we weren't properly overriding it.
Cc: stable@vger.kernel.org
Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
Signed-off-by: Suleiman Souhlal <suleiman@google.com>
---
tools/bpf/resolve_btfids/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/resolve_btfids/Makefile b/tools/bpf/resolve_btfids/Makefile
index afbddea3a39c..ce1b556dfa90 100644
--- a/tools/bpf/resolve_btfids/Makefile
+++ b/tools/bpf/resolve_btfids/Makefile
@@ -17,7 +17,7 @@ endif
# Overrides for the prepare step libraries.
HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \
- CROSS_COMPILE="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
+ CROSS_COMPILE="" CLANG_CROSS_FLAGS="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
RM ?= rm
HOSTCC ?= gcc
--
2.50.0.rc0.642.g800a2b2222-goog
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RESEND][PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
2025-06-06 5:36 ` [RESEND][PATCH] " Suleiman Souhlal
@ 2025-06-06 6:05 ` Greg KH
2025-06-06 6:08 ` Suleiman Souhlal
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2025-06-06 6:05 UTC (permalink / raw)
To: Suleiman Souhlal
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
stable
On Fri, Jun 06, 2025 at 02:36:50PM +0900, Suleiman Souhlal wrote:
> When cross compiling the kernel with clang, we need to override
> CLANG_CROSS_FLAGS when preparing the step libraries for
> resolve_btfids.
>
> Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
> when building tools in parallel"), MAKEFLAGS would have been set to a
> value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
> fact that we weren't properly overriding it.
>
> Cc: stable@vger.kernel.org
> Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
> Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> ---
> tools/bpf/resolve_btfids/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
You forgot to say why this is a resend :(
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND][PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
2025-06-06 6:05 ` Greg KH
@ 2025-06-06 6:08 ` Suleiman Souhlal
2025-06-06 6:20 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Suleiman Souhlal @ 2025-06-06 6:08 UTC (permalink / raw)
To: Greg KH
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
stable
On Fri, Jun 6, 2025 at 3:05 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Jun 06, 2025 at 02:36:50PM +0900, Suleiman Souhlal wrote:
> > When cross compiling the kernel with clang, we need to override
> > CLANG_CROSS_FLAGS when preparing the step libraries for
> > resolve_btfids.
> >
> > Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
> > when building tools in parallel"), MAKEFLAGS would have been set to a
> > value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
> > fact that we weren't properly overriding it.
> >
> > Cc: stable@vger.kernel.org
> > Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
> > Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> > ---
> > tools/bpf/resolve_btfids/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> You forgot to say why this is a resend :(
I wasn't sure how to say it. It didn't occur to me that I could have
replied to it with the reason.
It was because I had "Signed-of-by:" instead of "Signed-off-by:".
-- Suleiman
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND][PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
2025-06-06 6:08 ` Suleiman Souhlal
@ 2025-06-06 6:20 ` Greg KH
2025-06-06 6:21 ` Suleiman Souhlal
0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2025-06-06 6:20 UTC (permalink / raw)
To: Suleiman Souhlal
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
stable
On Fri, Jun 06, 2025 at 03:08:09PM +0900, Suleiman Souhlal wrote:
> On Fri, Jun 6, 2025 at 3:05 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Fri, Jun 06, 2025 at 02:36:50PM +0900, Suleiman Souhlal wrote:
> > > When cross compiling the kernel with clang, we need to override
> > > CLANG_CROSS_FLAGS when preparing the step libraries for
> > > resolve_btfids.
> > >
> > > Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
> > > when building tools in parallel"), MAKEFLAGS would have been set to a
> > > value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
> > > fact that we weren't properly overriding it.
> > >
> > > Cc: stable@vger.kernel.org
> > > Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
> > > Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> > > ---
> > > tools/bpf/resolve_btfids/Makefile | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > You forgot to say why this is a resend :(
>
> I wasn't sure how to say it. It didn't occur to me that I could have
> replied to it with the reason.
That goes below the --- line and it would be a v2, not a RESEND as you
changed something:
> It was because I had "Signed-of-by:" instead of "Signed-off-by:".
Which means it was not identical to the first version (a RESEND means a
maintainer can take either as they are the same).
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND][PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
2025-06-06 6:20 ` Greg KH
@ 2025-06-06 6:21 ` Suleiman Souhlal
2025-06-06 7:36 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Suleiman Souhlal @ 2025-06-06 6:21 UTC (permalink / raw)
To: Greg KH
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
stable
On Fri, Jun 6, 2025 at 3:20 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Jun 06, 2025 at 03:08:09PM +0900, Suleiman Souhlal wrote:
> > On Fri, Jun 6, 2025 at 3:05 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > >
> > > On Fri, Jun 06, 2025 at 02:36:50PM +0900, Suleiman Souhlal wrote:
> > > > When cross compiling the kernel with clang, we need to override
> > > > CLANG_CROSS_FLAGS when preparing the step libraries for
> > > > resolve_btfids.
> > > >
> > > > Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
> > > > when building tools in parallel"), MAKEFLAGS would have been set to a
> > > > value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
> > > > fact that we weren't properly overriding it.
> > > >
> > > > Cc: stable@vger.kernel.org
> > > > Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
> > > > Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> > > > ---
> > > > tools/bpf/resolve_btfids/Makefile | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > You forgot to say why this is a resend :(
> >
> > I wasn't sure how to say it. It didn't occur to me that I could have
> > replied to it with the reason.
>
> That goes below the --- line and it would be a v2, not a RESEND as you
> changed something:
>
> > It was because I had "Signed-of-by:" instead of "Signed-off-by:".
>
> Which means it was not identical to the first version (a RESEND means a
> maintainer can take either as they are the same).
Ah. Should I resend it as a v2?
Thanks,
-- Suleiman
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND][PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang.
2025-06-06 6:21 ` Suleiman Souhlal
@ 2025-06-06 7:36 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2025-06-06 7:36 UTC (permalink / raw)
To: Suleiman Souhlal
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
Masahiro Yamada, Ian Rogers, ssouhlal, bpf, linux-kernel, llvm,
stable
On Fri, Jun 06, 2025 at 03:21:45PM +0900, Suleiman Souhlal wrote:
> On Fri, Jun 6, 2025 at 3:20 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Fri, Jun 06, 2025 at 03:08:09PM +0900, Suleiman Souhlal wrote:
> > > On Fri, Jun 6, 2025 at 3:05 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> > > >
> > > > On Fri, Jun 06, 2025 at 02:36:50PM +0900, Suleiman Souhlal wrote:
> > > > > When cross compiling the kernel with clang, we need to override
> > > > > CLANG_CROSS_FLAGS when preparing the step libraries for
> > > > > resolve_btfids.
> > > > >
> > > > > Prior to commit d1d096312176 ("tools: fix annoying "mkdir -p ..." logs
> > > > > when building tools in parallel"), MAKEFLAGS would have been set to a
> > > > > value that wouldn't set a value for CLANG_CROSS_FLAGS, hiding the
> > > > > fact that we weren't properly overriding it.
> > > > >
> > > > > Cc: stable@vger.kernel.org
> > > > > Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
> > > > > Signed-off-by: Suleiman Souhlal <suleiman@google.com>
> > > > > ---
> > > > > tools/bpf/resolve_btfids/Makefile | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > You forgot to say why this is a resend :(
> > >
> > > I wasn't sure how to say it. It didn't occur to me that I could have
> > > replied to it with the reason.
> >
> > That goes below the --- line and it would be a v2, not a RESEND as you
> > changed something:
> >
> > > It was because I had "Signed-of-by:" instead of "Signed-off-by:".
> >
> > Which means it was not identical to the first version (a RESEND means a
> > maintainer can take either as they are the same).
>
> Ah. Should I resend it as a v2?
Think about what you would want to see if you were on the recieving end
of thousands of patches and had to try to figure out what to ignore and
what to pay attention to...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-06 7:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06 5:23 [PATCH] tools/resolve_btfids: Fix build when cross compiling kernel with clang Suleiman Souhlal
2025-06-06 5:36 ` [RESEND][PATCH] " Suleiman Souhlal
2025-06-06 6:05 ` Greg KH
2025-06-06 6:08 ` Suleiman Souhlal
2025-06-06 6:20 ` Greg KH
2025-06-06 6:21 ` Suleiman Souhlal
2025-06-06 7:36 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox