[PATCH v2 22/28] Supress unused command arguments warning with clang

H.J. Lu hjl.tools@gmail.com
Tue Oct 28 19:59:42 GMT 2025


On Wed, Oct 29, 2025 at 1:13 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> clang 20 issues an warning for the unused '-c' argument used to create
> errlist-data-aux-shared.S, errlist-data-aux.S, siglist-aux-shared.S,
> and siglist-aux.S.  Filter out the '-c' from the $(compile-command.c).
> ---
>  stdio-common/Makefile | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/stdio-common/Makefile b/stdio-common/Makefile
> index 806e4cec3a..ddffe653e9 100644
> --- a/stdio-common/Makefile
> +++ b/stdio-common/Makefile
> @@ -498,11 +498,11 @@ include ../Rules
>  # than 2.29 it might generate object sizes different than the expected ones.
>  $(objpfx)errlist-data-aux-shared.S: errlist-data-gen.c
>         $(make-target-directory)
> -       $(compile-command.c) $(pic-cppflags) $(pic-ccflag) $(no-stack-protector) -S
> +       $(filter-out -c,$(compile-command.c)) $(pic-cppflags) $(pic-ccflag) $(no-stack-protector) -S
>
>  $(objpfx)errlist-data-aux.S: errlist-data-gen.c
>         $(make-target-directory)
> -       $(compile-command.c) $(pie-default) $(no-stack-protector) -S
> +       $(filter-out -c,$(compile-command.c)) $(pie-default) $(no-stack-protector) -S
>
>  ifndef no_deps
>  -include $(objpfx)errlist-data-aux.S.d $(objpfx)errlist-data-aux-shared.S.d
> @@ -514,11 +514,11 @@ $(addprefix $(objpfx)errlist-data, $(object-suffixes-noshared)): \
>
>  $(objpfx)siglist-aux-shared.S: siglist-gen.c
>         $(make-target-directory)
> -       $(compile-command.c) $(pic-cppflags) $(pic-ccflag) $(no-stack-protector) -S
> +       $(filter-out -c,$(compile-command.c)) $(pic-cppflags) $(pic-ccflag) $(no-stack-protector) -S
>
>  $(objpfx)siglist-aux.S: siglist-gen.c
>         $(make-target-directory)
> -       $(compile-command.c) $(pie-default) $(no-stack-protector) -S
> +       $(filter-out -c,$(compile-command.c)) $(pie-default) $(no-stack-protector) -S
>
>  ifndef no_deps
>  -include $(objpfx)siglist-aux.S.d $(objpfx)siglist-aux-shared.S.d
> --
> 2.43.0
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.

-- 
H.J.


More information about the Libc-alpha mailing list