From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id DF0174BDC3 for ; Fri, 3 Oct 2025 12:28:10 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'colKFsd5044OV9eXrpWemXgg7Ttq2ng75+ybxZfuj7Y=', expected b'zCX/EjvcwP+ap0RYAl5B8cKHhM9Gwl22AV6/FyUDq4I=')) header.d=martin-st.20230601.gappssmtp.com header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1759494475; h=date : to : in-reply-to : message-id : references : mime-version : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=colKFsd5044OV9eXrpWemXgg7Ttq2ng75+ybxZfuj7Y=; b=TTdWPwnFy/ltr62y2B9b4lhAXYxy/gMnz1fgjEVOMFrsJiGSeuyKKah9lpCO5F0TBzFEF QHodrIsnMrXdRptTkqs4kTgyMmynIdWZ79Y/yuKwcyFKcBVg6jVlAPCiHCI0kx6lQtcErmz 8sCX/lTOhWnKvjMABMQcY6+dLr/ydVqSXYBqlkYHA+ignhccn9/Cop6TjKYR+j0UuxCRB6y 3jR9tn1b0BQxcf+WFN4IvfHDqMZLYUVdfMjZyi633IkIQ53hr+z92ra470Q2VKslPniIcW8 MqwJ/Zdymz4pb14Wdyj1uRiO7Xvo8XY7r/yUkZKv7TStVnuefnBM9fVAhqmQ== Received: from [172.19.0.2] (unknown [172.19.0.2]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id C6D1468EFDE; Fri, 3 Oct 2025 15:27:55 +0300 (EEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1759494461; b=mRhdhwhniL5QRtJ49zc3sVNGOoHRerRWYxEe2K8qLSNQo+HXf8zoUNvSNVUwEN18ZSjpX +AxCDfNeg1GxVzmXBkpEkLe401G448rF7Rz6EUTOEfAFD+vYOrgqdjIwGUUEiQGX8J/0apZ CCEulirRXcsKmhCmUypygh7JBSo+TGQAf00Gv2oTPVqysvJTR37KzZ9ZlcpquS+AFdPf0KP NafK7nYy+MNAbl4cP2awuRG674iB7coEednG2R+NUZ4q9CQrK1Pa0DAOLxBgX/YH+6CHDBE H5BbhcD3G4gQoR07gkC1QXAEF7a9jZdckeN0VfnDdPSBcm35F63nMP2N2VNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1759494461; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=colKFsd5044OV9eXrpWemXgg7Ttq2ng75+ybxZfuj7Y=; b=ucwAvhvDepEqeC/UlutCz1vIs07SbAd3NP6h+Ix4O6B73XRIDYP/XYhJ9oEkao+PDdkXt twBsYXvC+guBapdJVGO615gDGPg5HhX+TED9x8AmTjGZD8YgSzSzGw6fe10nXDSj3B9RYTZ jnbzABqne2FPsEsoApjygq9Q2+DP+f5pQboEdHUMjx70S1SQRVrD1LEMe+Mc13VpwDqOY7z 3CBbd+y2UqF4379nRQQ16cmNXFlurSWDgV2nQ971c0PEFmeT7s3ZK1CFQSeOpMBjNNbjI0T fWz/1Bf2+hFWGea0r5eoy9qUD/BR95R5dBWwW+MH/Ve80ieChij6ni6m9ZrQ== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=martin-st.20230601.gappssmtp.com; arc=none; dmarc=none Authentication-Results: ffmpeg.org; dkim=pass header.d=martin-st.20230601.gappssmtp.com; arc=none (Message is not ARC signed); dmarc=none Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id CA93A68EA2B for ; Fri, 3 Oct 2025 15:27:29 +0300 (EEST) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-579363a4602so2484618e87.0 for ; Fri, 03 Oct 2025 05:27:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1759494449; x=1760099249; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=zCX/EjvcwP+ap0RYAl5B8cKHhM9Gwl22AV6/FyUDq4I=; b=ys9zzRP64+ny7Fi6U1QWTBM9huV3pPibzR84N9OYUD0H6JlOIVfWHW8fS1A+A1iNI4 BnCkJ7Plzttmhc7sc68cbx+pYukHCyQ+icMMyL7+aZuPOfUPP3u/JNtgG+A/wPpXhuoT vWIDBBhqqvg7LCdBqbOMerbAgJMk5QzoPYApKie4QpMvNuQBQuQ2E96keo1Wimb4i2Pu OHq+qkUXt2i5z5eE25ESObFNpInOg5pHUY+GP1DAwep89hARoC4dNYBS4XcDiqTfnDZY Q5mLcHGbJb3KlNsnjI0V2xzt1lj4CrkE+MVhMUM+v5cvcu9zjOoDYnAm6n1SRCPOZFDl sgyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759494449; x=1760099249; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zCX/EjvcwP+ap0RYAl5B8cKHhM9Gwl22AV6/FyUDq4I=; b=OktP5TMizLf0E8NMpFQXU/rHJPfjJxYed3iSte6Y56Xc0y41nsX8Isga8NAgsKytaH GTo56eMAqDPW4iq6vmv2YDN0mqD+2kHcHMdiAuVRxeHDlpjNBqa6nV4a6b22PJLEXr1H Be18WhbA6ZAMtlNu3j+JlCCGqoHdi3IVLaisfcdrnOW5CMbLFqWSILfd3XHWnZ36Z3yJ 2OPEHv6eXs8Gul4ZVmY3HtfCj5eTvtf4rQm3k7gPUaUP977LvgArridhuAls0som+0/g 84cD6oiCQEigODDjw3+btDNgBQ5WE/+XFArSj9LFRqDNGMLgi5u3hC+knCAZ0XffLwTw qwFA== X-Gm-Message-State: AOJu0YyEV3WFCbMCUKyubdbcLhrNbUBYYGzd1KZyQG4FjbjE1z0L/9y3 JoHlZMNLoX8PeOJPbVTIYNLqeJgljcP9ooHC2D6Eq9To/xW2Q7x0LuR0rake4+omow== X-Gm-Gg: ASbGnctX/xXkFtBk3Mde6WE3x51Vy+fdYhCjCvZY1P6MEp+siaP2GDxzuGF6T/4FXhD LwOmFgEGH/LwFIYFiQJi3Sbqm5BDBiOM7m+4MscIohBiMj+qixN13I6MgXorx4BQuXr8QfLCp6C 1ninVvmONLydVGDjY4+ZMUf+Ga2sZF61n9BzqYBHA7xmyRFH9ICAtJmCWBJT6sysaCa0WcQL270 kRobh1GnRg77fZpYo3Erne0c8/89NtHLU3xguDfdN3+sd6wZl+5ul3/tCELQtM45huWHGFL0Qax 45K1dB3RZ73EFbtYZxn/0NIaa7xCjdKN+ygsBuiBYqBo2VJozLZUGm8PDjXRKYdDjLmhpgznH93 g0wDuj8kc5Ad738jleTWtrICWxNzFwmgKAwXqXTNjlIdO9VMooWqXQW/E1XvXxAWssGX0QRc8g8 VeoV1XUGG3R9Fk4xZJMopUvZ/QvHd5jTXLwEBwy4pT7DFSONHGCfQD X-Google-Smtp-Source: AGHT+IGZ8bJ0iAgj6W7kKpS9oG7wXgk3QL5V+LgP8Ujgi0Z9Pd9d6diTNlMpuZjYzKtNFMFeWcURAg== X-Received: by 2002:a05:6512:3e11:b0:55f:3525:3e52 with SMTP id 2adb3069b0e04-58cb9a3794amr755346e87.14.1759494448752; Fri, 03 Oct 2025 05:27:28 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-58b0112463bsm1817165e87.2.2025.10.03.05.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Oct 2025 05:27:28 -0700 (PDT) Date: Fri, 3 Oct 2025 15:27:27 +0300 (EEST) To: Harish Raja Selvan In-Reply-To: Message-ID: <2af51c6e-4a3d-a6fe-e78-95de4fd8b4b6@martin.st> References: <175853548089.14922.13561628859475164651@f2eeb8e52785> <537b8baa-73e1-e4eb-fd5a-20bb8f1a591@martin.st> <582fec83-771a-eef4-d5d1-6ff5621cff98@martin.st> MIME-Version: 1.0 Message-ID-Hash: XC7PEH7WRJP65TK4IWM2PPZK5BQ4MKCN X-Message-ID-Hash: XC7PEH7WRJP65TK4IWM2PPZK5BQ4MKCN X-MailFrom: SRS0=4Tgu=4M=martin.st=martin@ffmpeg.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Content-Filtered-By: Mailman/MimeDel 3.3.10 X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] Re: [DISCUSSION] Adding ARM64EC support to FFmpeg List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: =?utf-8?q?Martin_Storsj=C3=B6_via_ffmpeg-devel?= Cc: "harish.rajaselvan--- via ffmpeg-devel" , =?ISO-8859-15?Q?Martin_Storsj=F6?= Content-Type: text/plain; charset="windows-1252"; format="flowed" Content-Transfer-Encoding: quoted-printable Archived-At: List-Archive: List-Post: On Tue, 30 Sep 2025, Harish Raja Selvan wrote: > Thank you for your feedback and questions about the ARM64EC patch. > I=92m sharing the build system patch for enabling ARM64EC support in FFmp= eg. > This patch addresses .def=A0file generation for ARM64EC builds on Windows. >=20 > In-Lined patch: >=20 > diff --git a/compat/windows/makedef b/compat/windows/makedef > index add8222d13..59e300ab61 100755 > --- a/compat/windows/makedef > +++ b/compat/windows/makedef > @@ -108,7 +108,12 @@ if [ -n "$NM" ]; then > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cut -d' ' -f3 | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sed -e "s/^${prefix}//") > =A0else > - =A0 =A0dump=3D$(dumpbin.exe -linkermember:1 ${libname} | > + =A0 =A0member=3D1 > + =A0 =A0arch=3D$VSCMD_ARG_TGT_ARCH > + =A0 =A0if [ "${arch^^}" =3D "ARM64EC" ]; then > + =A0 =A0 =A0 =A0member=3D32 > + =A0 =A0fi We shouldn't inspect any VSCMD_* env variables here in order to deduce the = target architecture. (Also, how do you initialize the environment in order = to get such a variable set? If you just open a regular arm64 VS command=20 prompt, which AFAIK is the default environment for arm64ec compilation, I=20 wouldn't expect such a variable to be set?) Instead we need to deduce the architecture from something else here -=20 potentially by passing some parameter from configure. > + =A0 =A0 =A0 =A0dump=3D$(dumpbin.exe -linkermember:${member} ${libname} | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0sed -e '/public symbols/,$!d' -e '/^ \{1,\= }Summary/,$d' -e > "s/ \{1,\}${prefix}/ /" -e 's/ \{1,\}/ /g' | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tail -n +2 | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0cut -d' ' -f3) > @@ -121,7 +126,7 @@ list=3D"" > =A0for exp in ${regex}; do > =A0 =A0 =A0list=3D"${list}"' > =A0'$(echo "${dump}" | > - =A0 =A0 =A0 =A0 =A0grep "^${exp}" | > + =A0 =A0 =A0 =A0 =A0grep "^${exp}" | awk '!/\$exit_thunk/{print}' | I presume the added awk expression here is just to filter out any line=20 that doesn't match '$exit_thunk'? Why not just a "grep -v '$exit_thunk'"?=20 And that can be in the dump expression as well, in order not to need to do = that filtering for each expression. (If we add it to the dump expression,=20 we do need to include it in both variants of the dump expression though;=20 it's possible to build arm64ec with mingw style tools as well.) For me, this doesn't really end up matching any symbols - I only get the=20 data symbols. What does EXTERN_PREFIX end up being set to in your=20 configurations; for me it's an empty string. Does it get set to "#" in=20 your case? > For reference, here is the configuration used to build FFmpeg with MSVC f= or > ARM64EC: > I've also attached the same configuration in ffmpeg-arm64ec-msvc.config f= or > convenience. >=20 > # find_ar_lib resolves to /usr/share/automake-1.16/ar-lib > AR_LIB=3D"$(find_ar_lib)" > AR_CMD=3D"${AR_LIB} lib.exe -machine:arm64ec" Why do you need any extra ar-lib here? This works fine for me with just=20 AR_CMD=3D"lib.exe -machine:arm64ec". > ARCH=3D"arm64" >=20 > "${SRC_DIR}/configure" \ > =A0 =A0 --toolchain=3Dmsvc \ > =A0 =A0 --target-os=3Dwin64 \ > =A0 =A0 --cc=3Dcl.exe \ > =A0 =A0 --cxx=3Dcl.exe \ > =A0 =A0 --extra-cxxflags=3D"-arm64EC" \ > =A0 =A0 --extra-cflags=3D"-arm64EC" \ > =A0 =A0 --extra-ldflags=3D"/machine:arm64ec" \ > =A0 =A0 --as=3D"armasm64.exe -machine ARM64EC" \ > =A0 =A0 --ld=3Dlink.exe \ > =A0 =A0 --ar=3D"${AR_CMD}" \ > =A0 =A0 --arch=3D"${ARCH}" >=20 > In my setup, this configuration requires the gas-preprocessor.pl patch, as > the build otherwise ends with a =93GNU assembler not found=94 error. Thanks - with this context, it's easier to review your gas-preprocessor=20 patch. As far as I can see, this builds fine without any extra modifications of=20 ffmpeg, as long as gas-preprocessor is patched. Building with=20 --enable-shared would require the suggested changes to makedef, but those=20 changes aren't entirely right in order to work for me in my tests. I have an alternative suggestion on how to do the gas-preprocessor patch - = I'll send those patches and CC you on them. Another alternative for gas-preprocessor would be to just look for the=20 -arm64EC option, and inject the "-machine arm64ec" options implicitly in=20 that case (it turns out I actually had such a patch lying around since=20 experiments in 2021), but it's perhaps more transparent to force the=20 caller of gas-preprocessor to provide the option. // Martin _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org