]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Add 'aarch64' support to the file magic test
authorIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Wed, 11 Sep 2024 17:22:09 +0000 (20:22 +0300)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Wed, 18 Sep 2024 14:15:27 +0000 (17:15 +0300)
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.

build-aux/ltmain.in
m4/libtool.m4

index fb43fef091cd1ecf37d6d363640be482f676a4dd..68aca6051294a5b5c6f77d7e960ec38ff440fc9b 100644 (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" ||
index 6a6d13c512e3c2a4968a41148e9903d6a3239d6d..e5ddacee99c5cded1444479ef018c9b99e477fa6 100644 (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
   ;;