Add 'aarch64' support to the file magic test

The file magic test fails to determine the file type of libraries when
cross-compiling with an aarch64 compiler without additional strings to
search for in an objdump.

* build-aux/ltmain.in: Append 'pe-aarch64' to file_magic in the
lt_cv_deplibs_check_method.
* m4/libtool.m4: Append 'pe-aarch64' to file format check.
This commit is contained in:
Ileana Dumitrescu 2024-09-11 20:22:09 +03:00
parent 0483b0d83d
commit 182c7b3e25
No known key found for this signature in database
GPG Key ID: 6570EA01146F7354
2 changed files with 2 additions and 2 deletions

View File

@ -3046,7 +3046,7 @@ func_win32_libid ()
*ar\ archive*) # could be an import, or static
# Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
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
case $nm_interface in
"MS dumpbin")
if func_cygming_ms_implib_p "$1" ||

2
m4/libtool.m4 vendored
View File

@ -3535,7 +3535,7 @@ mingw* | windows* | pw32*)
lt_cv_file_magic_cmd='func_win32_libid'
else
# Keep this pattern in sync with the one in func_win32_libid.
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
;;