Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [GASPP PATCH 1/2] Pass "-machine" options through to armasm
@ 2025-10-03 12:49 Martin Storsjö via ffmpeg-devel
  2025-10-03 12:49 ` [FFmpeg-devel] [GASPP PATCH 2/2] Filter out the cl.exe option -arm64EC from armasm Martin Storsjö via ffmpeg-devel
  2025-10-09 12:11 ` [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
  0 siblings, 2 replies; 5+ messages in thread
From: Martin Storsjö via ffmpeg-devel @ 2025-10-03 12:49 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: harish.rajaselvan, Martin Storsjö

Filter them out from the preprocessor invocation, and don't remove
them based on matching the "^-m" pattern.

As an alternative, we could also have gas-preprocessor.pl implicitly
add this option if the option "-arm64EC" is found, but requiring
the user to pass "-machine arm64ec" explicitly is more transparent.
---
 gas-preprocessor.pl | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 62c1a04..234c005 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -104,13 +104,17 @@ if ($as_type eq "armasm") {
 
     $preprocess_c_cmd[0] = "cpp";
 
-    # Remove -ignore XX parameter pairs from preprocess_c_cmd
+    # Remove -ignore XX and -machine XX parameter pairs from preprocess_c_cmd
     my $index = 1;
     while ($index < $#preprocess_c_cmd) {
         if ($preprocess_c_cmd[$index] eq "-ignore" and $index + 1 < $#preprocess_c_cmd) {
             splice(@preprocess_c_cmd, $index, 2);
             next;
         }
+        if ($preprocess_c_cmd[$index] eq "-machine" and $index + 1 < $#preprocess_c_cmd) {
+            splice(@preprocess_c_cmd, $index, 2);
+            next;
+        }
         $index++;
     }
     if (grep /^-MM$/, @preprocess_c_cmd) {
@@ -195,7 +199,8 @@ if ($as_type ne "armasm") {
     # which doesn't support any of the common compiler/preprocessor options.
     @gcc_cmd = grep ! /^-D/, @gcc_cmd;
     @gcc_cmd = grep ! /^-U/, @gcc_cmd;
-    @gcc_cmd = grep ! /^-m/, @gcc_cmd;
+    # Remove -m* parameters, except for -machine, which is a valid armasm option.
+    @gcc_cmd = grep ! /^-m(?!achine)/, @gcc_cmd;
     @gcc_cmd = grep ! /^-M/, @gcc_cmd;
     @gcc_cmd = grep ! /^-c$/, @gcc_cmd;
     @gcc_cmd = grep ! /^-I/, @gcc_cmd;
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] [GASPP PATCH 2/2] Filter out the cl.exe option -arm64EC from armasm
  2025-10-03 12:49 [FFmpeg-devel] [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
@ 2025-10-03 12:49 ` Martin Storsjö via ffmpeg-devel
  2025-10-09 12:11 ` [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Storsjö via ffmpeg-devel @ 2025-10-03 12:49 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: harish.rajaselvan, Martin Storsjö

---
 gas-preprocessor.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl
index 234c005..1ba0563 100755
--- a/gas-preprocessor.pl
+++ b/gas-preprocessor.pl
@@ -188,6 +188,7 @@ if ($as_type ne "armasm") {
     @gcc_cmd = grep ! /^-Z/, @gcc_cmd;
     @gcc_cmd = grep ! /^-fp/, @gcc_cmd;
     @gcc_cmd = grep ! /^-EHsc$/, @gcc_cmd;
+    @gcc_cmd = grep ! /^-arm64EC$/, @gcc_cmd;
     @gcc_cmd = grep ! /^-O/, @gcc_cmd;
     @gcc_cmd = grep ! /^-FS/, @gcc_cmd;
     @gcc_cmd = grep ! /^-w/, @gcc_cmd;
-- 
2.43.0

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm
  2025-10-03 12:49 [FFmpeg-devel] [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
  2025-10-03 12:49 ` [FFmpeg-devel] [GASPP PATCH 2/2] Filter out the cl.exe option -arm64EC from armasm Martin Storsjö via ffmpeg-devel
@ 2025-10-09 12:11 ` Martin Storsjö via ffmpeg-devel
  2025-10-10 11:11   ` Harish Raja Selvan via ffmpeg-devel
  1 sibling, 1 reply; 5+ messages in thread
From: Martin Storsjö via ffmpeg-devel @ 2025-10-09 12:11 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: harish.rajaselvan, Martin Storsjö

On Fri, 3 Oct 2025, Martin Storsjö wrote:

> Filter them out from the preprocessor invocation, and don't remove
> them based on matching the "^-m" pattern.
>
> As an alternative, we could also have gas-preprocessor.pl implicitly
> add this option if the option "-arm64EC" is found, but requiring
> the user to pass "-machine arm64ec" explicitly is more transparent.
> ---
> gas-preprocessor.pl | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)

Ping Harish - does this look like a reasonable alternative to your patch? 
If you agree with this direction (and the other patch here), I'd go ahead 
and apply these, to have the gas-preprocessor aspect of arm64ec done.

// Martin
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm
  2025-10-09 12:11 ` [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
@ 2025-10-10 11:11   ` Harish Raja Selvan via ffmpeg-devel
  2025-10-10 13:06     ` Martin Storsjö via ffmpeg-devel
  0 siblings, 1 reply; 5+ messages in thread
From: Harish Raja Selvan via ffmpeg-devel @ 2025-10-10 11:11 UTC (permalink / raw)
  To: Martin Storsjö, ffmpeg-devel; +Cc: Harish Raja Selvan

Hi Martin,
Thanks for the patch! I’ve tested it, and it works as expected. The static ARM64EC build of FFmpeg now builds successfully without any additional code changes. I’m now looking into the changes needed in the makedef script for the --enable-shared build.
Thanks,
Harish.
________________________________
From: Martin Storsjö <martin@martin.st>
Sent: 09 October 2025 17:41
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Cc: Harish Raja Selvan <harish.rajaselvan@multicorewareinc.com>
Subject: Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm

On Fri, 3 Oct 2025, Martin Storsjö wrote:

> Filter them out from the preprocessor invocation, and don't remove
> them based on matching the "^-m" pattern.
>
> As an alternative, we could also have gas-preprocessor.pl implicitly
> add this option if the option "-arm64EC" is found, but requiring
> the user to pass "-machine arm64ec" explicitly is more transparent.
> ---
> gas-preprocessor.pl | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)

Ping Harish - does this look like a reasonable alternative to your patch?
If you agree with this direction (and the other patch here), I'd go ahead
and apply these, to have the gas-preprocessor aspect of arm64ec done.

// Martin
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm
  2025-10-10 11:11   ` Harish Raja Selvan via ffmpeg-devel
@ 2025-10-10 13:06     ` Martin Storsjö via ffmpeg-devel
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Storsjö via ffmpeg-devel @ 2025-10-10 13:06 UTC (permalink / raw)
  To: Harish Raja Selvan; +Cc: ffmpeg-devel, Martin Storsjö

On Fri, 10 Oct 2025, Harish Raja Selvan wrote:

> Hi Martin,
> Thanks for the patch! I’ve tested it, and it works as expected. The static
> ARM64EC build of FFmpeg now builds successfully without any additional code
> changes. I’m now looking into the changes needed in the makedef script for
> the --enable-shared build.

Thanks - then I'll go ahead and apply these two patches on 
gas-preprocessor.

// Martin
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-10 13:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-03 12:49 [FFmpeg-devel] [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
2025-10-03 12:49 ` [FFmpeg-devel] [GASPP PATCH 2/2] Filter out the cl.exe option -arm64EC from armasm Martin Storsjö via ffmpeg-devel
2025-10-09 12:11 ` [FFmpeg-devel] Re: [GASPP PATCH 1/2] Pass "-machine" options through to armasm Martin Storsjö via ffmpeg-devel
2025-10-10 11:11   ` Harish Raja Selvan via ffmpeg-devel
2025-10-10 13:06     ` Martin Storsjö via ffmpeg-devel

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 http://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/ http://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