Re: [PATCH v12 2/3] kbuild: change --thin back to 'T' in $(AR)

From: Rong Xu

Date: Tue Jun 02 2026 - 12:58:53 EST


Thanks Nicolas for the review!

It looks like Nathan already merged the patch series and squashed this
specific patch into the previous one, which
removed the commit message and that comment. These changes actually
incorporate your review feedback.

Cheers,

-Rong

On Tue, Jun 2, 2026 at 1:46 AM Nicolas Schier <nsc@xxxxxxxxxx> wrote:
>
> On Fri, May 29, 2026 at 11:53:45AM -0700, xur@xxxxxxxxxx wrote:
> > From: Rong Xu <xur@xxxxxxxxxx>
> >
> > The '-T' flag in $(AR) is no longer problematic since the minimum
> > requirement for LLVM has been updated to version 15. As of LLVM 14
> > and onward, the '-T' flag functions identically to the '--thin' flag.
>
> For correctness: it's called "'T' modifier" (instead of "'-T' flag").
>
> >
> > Fixed the issue seen on IBM Power11 System:
> > ar: unrecognized option '--thin'
> >
> > Reported-by: Venkat Rao Bagalkote <venkat88@xxxxxxxxxxxxx>
> > Closes: https://lore.kernel.org/linux-next/476507c9-a371-4864-9e87-572c1ecae82d@xxxxxxxxxxxxx/
> > Signed-off-by: Rong Xu <xur@xxxxxxxxxx>
> > ---
> > scripts/Makefile.vmlinux_a | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/scripts/Makefile.vmlinux_a b/scripts/Makefile.vmlinux_a
> > index 9774f02b43b2..650d44330d1f 100644
> > --- a/scripts/Makefile.vmlinux_a
> > +++ b/scripts/Makefile.vmlinux_a
> > @@ -10,12 +10,12 @@ include $(srctree)/scripts/Makefile.lib
> > # Link of built-in-fixup.a
> > # ---------------------------------------------------------------------------
> >
> > -# '$(AR) mPi' needs --thin to workaround the bug of llvm-ar <= 14
> > +# '$(AR) mPi' needs 'T' to workaround the bug of llvm-ar <= 14
>
> This comment should be removed.
>
> > quiet_cmd_ar_builtin_fixup = AR $@
> > cmd_ar_builtin_fixup = \
> > rm -f $@; \
> > - $(AR) cDPrS --thin $@ $(KBUILD_VMLINUX_OBJS); \
> > - $(AR) mPi --thin $$($(AR) t $@ | sed -n 1p) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
> > + $(AR) cDPrST $@ $(KBUILD_VMLINUX_OBJS); \
> > + $(AR) mPiT $$($(AR) t $@ | sed -n 1p) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
> >
> > targets += built-in-fixup.a
> > built-in-fixup.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt FORCE
> > --
> > 2.54.0.823.g6e5bcc1fc9-goog
> >
>
> Thanks!
>
> Reviewed-by: Nicolas Schier <nsc@xxxxxxxxxx>