Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [GASPP PATCH] Omit the "-c" argument from the preprocessing command
Date: Mon, 29 Jul 2024 16:15:11 +0300 (EEST)
Message-ID: <cd48815e-9cf-6dcc-b16d-d7d87d6adf8@martin.st> (raw)
In-Reply-To: <20240725082504.883576-1-martin@martin.st>

On Thu, 25 Jul 2024, Martin Storsjö wrote:

> A command like "cc -c -E" is tautological; the -c is ignored, when
> we explicitly specify that we want to preprocess only.
>
> Since
> https://github.com/llvm/llvm-project/commit/6461e537815f7fa68cef06842505353cf5600e9c
> and https://github.com/llvm/llvm-project/pull/98607, Clang now
> warns about the unused "-c" argument in this case.
>
> We already did omit the "-c" argument when preprocessing
> (with cl.exe) for armasm, but do this for other cases as well.
> ---
> gas-preprocessor.pl | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
> index 19b0131..aa3abc0 100755
> --- a/gas-preprocessor.pl
> +++ b/gas-preprocessor.pl
> @@ -155,6 +155,8 @@ while ($index < $#preprocess_c_cmd) {
>     $index++;
> }
>
> +@preprocess_c_cmd = grep ! /^-c$/, @preprocess_c_cmd;
> +
> my $tempfile;
> if ($as_type ne "armasm") {
>     @gcc_cmd = map { /\.[csS]$/ ? qw(-x assembler -) : $_ } @gcc_cmd;
> @@ -163,7 +165,6 @@ if ($as_type ne "armasm") {
>     # Clang warns about unused -D parameters when invoked with "-x assembler".
>     @gcc_cmd = grep ! /^-D/, @gcc_cmd;
> } else {
> -    @preprocess_c_cmd = grep ! /^-c$/, @preprocess_c_cmd;
>     @preprocess_c_cmd = grep ! /^-m/, @preprocess_c_cmd;
>
>     @preprocess_c_cmd = grep ! /^-G/, @preprocess_c_cmd;
> -- 
> 2.34.1

Will push this soon.

// Martin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

      reply	other threads:[~2024-07-29 13:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-25  8:25 Martin Storsjö
2024-07-29 13:15 ` Martin Storsjö [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd48815e-9cf-6dcc-b16d-d7d87d6adf8@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git