From cc6ee2cf6fe7d33ae648735d353d25696f040d2b Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 17 Sep 2024 14:10:02 +0300
Subject: [PATCH] autotools, libtool, win32: add 'aarch64' support to the file
magic test.
From libtool development commit 1638a6407573b74517b57a0f6e596918344a4394
---
acinclude/libtool.m4 | 2 +-
configure | 2 +-
ltmain.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/acinclude/libtool.m4 b/acinclude/libtool.m4
index 94a5a731..d4221abe 100644
--- a/acinclude/libtool.m4
+++ b/acinclude/libtool.m4
@@ -3033,7 +3033,7 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
lt_cv_deplibs_check_method=pass_all
diff --git a/configure b/configure
index 7760fc9c..c1a3ef70 100755
--- a/configure
+++ b/configure
@@ -5580,7 +5580,7 @@ mingw* | pw32*)
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
lt_cv_deplibs_check_method=pass_all
diff --git a/ltmain.sh b/ltmain.sh
index 6cfe150b..67d2fd74 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -2568,7 +2568,7 @@ func_win32_libid ()
;;
*ar\ archive*) # could be an import, or static
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null ; then
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 |
$SED -n -e '
1,100{