* [PATCH] kbuild: replace deprecated T option with --thin for $(AR)
@ 2025-05-25 11:28 Masahiro Yamada
2025-05-27 22:16 ` Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2025-05-25 11:28 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Masahiro Yamada, Bill Wendling, Justin Stitt,
Nathan Chancellor, Nick Desaulniers, Nicolas Schier, llvm
According to 'man ar':
T Deprecated alias for --thin. T is not recommended because in
many ar implementations T has a different meaning, as specified
by X/Open System Interface.
'man llvm-ar' also states:
T Alias for --thin. In many ar implementations T has a different
meaning, as specified by X/Open System interface.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
Makefile | 6 +++---
scripts/Makefile.build | 2 +-
scripts/Makefile.lib | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index efbc0966b82a..682a8002b7a1 100644
--- a/Makefile
+++ b/Makefile
@@ -1201,12 +1201,12 @@ ifdef CONFIG_TRIM_UNUSED_KSYMS
KBUILD_MODULES := 1
endif
-# '$(AR) mPi' needs 'T' to workaround the bug of llvm-ar <= 14
+# '$(AR) mPi' needs --thin to workaround the bug of llvm-ar <= 14
quiet_cmd_ar_vmlinux.a = AR $@
cmd_ar_vmlinux.a = \
rm -f $@; \
- $(AR) cDPrST $@ $(KBUILD_VMLINUX_OBJS); \
- $(AR) mPiT $$($(AR) t $@ | sed -n 1p) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
+ $(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)
targets += vmlinux.a
vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt FORCE
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 8d8252229895..284931f2a9a2 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -456,7 +456,7 @@ $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ;
quiet_cmd_ar_builtin = AR $@
cmd_ar_builtin = rm -f $@; \
$(if $(real-prereqs), printf "$(obj)/%s " $(patsubst $(obj)/%,%,$(real-prereqs)) | xargs) \
- $(AR) cDPrST $@
+ $(AR) cDPrS --thin $@
$(obj)/built-in.a: $(real-obj-y) FORCE
$(call if_changed,ar_builtin)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index d858a3223bcd..e37e2db5f528 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -280,7 +280,7 @@ quiet_cmd_ld = LD $@
# ---------------------------------------------------------------------------
quiet_cmd_ar = AR $@
- cmd_ar = rm -f $@; $(AR) cDPrsT $@ $(real-prereqs)
+ cmd_ar = rm -f $@; $(AR) cDPrs --thin $@ $(real-prereqs)
# Objcopy
# ---------------------------------------------------------------------------
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: replace deprecated T option with --thin for $(AR)
2025-05-25 11:28 [PATCH] kbuild: replace deprecated T option with --thin for $(AR) Masahiro Yamada
@ 2025-05-27 22:16 ` Nathan Chancellor
2025-06-05 20:40 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2025-05-27 22:16 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, linux-kernel, Bill Wendling, Justin Stitt,
Nick Desaulniers, Nicolas Schier, llvm
On Sun, May 25, 2025 at 08:28:31PM +0900, Masahiro Yamada wrote:
> According to 'man ar':
>
> T Deprecated alias for --thin. T is not recommended because in
> many ar implementations T has a different meaning, as specified
> by X/Open System Interface.
>
> 'man llvm-ar' also states:
>
> T Alias for --thin. In many ar implementations T has a different
> meaning, as specified by X/Open System interface.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
Yeah, seems reasonable to get ahead of the curve in case either
implementation decides to drop it.
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
>
> Makefile | 6 +++---
> scripts/Makefile.build | 2 +-
> scripts/Makefile.lib | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index efbc0966b82a..682a8002b7a1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1201,12 +1201,12 @@ ifdef CONFIG_TRIM_UNUSED_KSYMS
> KBUILD_MODULES := 1
> endif
>
> -# '$(AR) mPi' needs 'T' to workaround the bug of llvm-ar <= 14
> +# '$(AR) mPi' needs --thin to workaround the bug of llvm-ar <= 14
> quiet_cmd_ar_vmlinux.a = AR $@
> cmd_ar_vmlinux.a = \
> rm -f $@; \
> - $(AR) cDPrST $@ $(KBUILD_VMLINUX_OBJS); \
> - $(AR) mPiT $$($(AR) t $@ | sed -n 1p) $@ $$($(AR) t $@ | grep -F -f $(srctree)/scripts/head-object-list.txt)
> + $(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)
>
> targets += vmlinux.a
> vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt FORCE
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 8d8252229895..284931f2a9a2 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -456,7 +456,7 @@ $(subdir-modorder): $(obj)/%/modules.order: $(obj)/% ;
> quiet_cmd_ar_builtin = AR $@
> cmd_ar_builtin = rm -f $@; \
> $(if $(real-prereqs), printf "$(obj)/%s " $(patsubst $(obj)/%,%,$(real-prereqs)) | xargs) \
> - $(AR) cDPrST $@
> + $(AR) cDPrS --thin $@
>
> $(obj)/built-in.a: $(real-obj-y) FORCE
> $(call if_changed,ar_builtin)
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index d858a3223bcd..e37e2db5f528 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -280,7 +280,7 @@ quiet_cmd_ld = LD $@
> # ---------------------------------------------------------------------------
>
> quiet_cmd_ar = AR $@
> - cmd_ar = rm -f $@; $(AR) cDPrsT $@ $(real-prereqs)
> + cmd_ar = rm -f $@; $(AR) cDPrs --thin $@ $(real-prereqs)
>
> # Objcopy
> # ---------------------------------------------------------------------------
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: replace deprecated T option with --thin for $(AR)
2025-05-27 22:16 ` Nathan Chancellor
@ 2025-06-05 20:40 ` Masahiro Yamada
0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2025-06-05 20:40 UTC (permalink / raw)
To: Nathan Chancellor
Cc: linux-kbuild, linux-kernel, Bill Wendling, Justin Stitt,
Nick Desaulniers, Nicolas Schier, llvm
On Wed, May 28, 2025 at 7:16 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Sun, May 25, 2025 at 08:28:31PM +0900, Masahiro Yamada wrote:
> > According to 'man ar':
> >
> > T Deprecated alias for --thin. T is not recommended because in
> > many ar implementations T has a different meaning, as specified
> > by X/Open System Interface.
> >
> > 'man llvm-ar' also states:
> >
> > T Alias for --thin. In many ar implementations T has a different
> > meaning, as specified by X/Open System interface.
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
>
> Yeah, seems reasonable to get ahead of the curve in case either
> implementation decides to drop it.
>
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
I gave up due to this report:
https://lore.kernel.org/all/20250603163933.4df366ff@canb.auug.org.au/
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-05 20:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-25 11:28 [PATCH] kbuild: replace deprecated T option with --thin for $(AR) Masahiro Yamada
2025-05-27 22:16 ` Nathan Chancellor
2025-06-05 20:40 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox