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

From: xur

Date: Tue Mar 31 2026 - 12:13:02 EST


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.

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
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.53.0.1018.g2bb0e51243-goog