Skip to content

Commit

Permalink
checkasm: detect configuration for aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
quarium authored and cmassiot committed Feb 19, 2024
1 parent b9b4be5 commit 1612026
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
19 changes: 17 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ case "${host_os}" in
ARCH_X86_64=1
;;
esac
AC_DEFINE(EXTERN_ASM, _, Mangling prefix)
;;
*mingw32*)
case "${host}" in
Expand All @@ -62,6 +63,7 @@ case "${host_os}" in
ARCH_X86_64=1
;;
esac
AC_DEFINE(EXTERN_ASM, , Mangling prefix)
;;
*)
case "${host}" in
Expand All @@ -73,6 +75,8 @@ case "${host_os}" in
ARCH_X86_64=1
;;
esac
AC_DEFINE(HAVE_SECTION_DATA_REL_RO, 1, Define to 1 if section data.rel.ro is supported)
AC_DEFINE(EXTERN_ASM, , Mangling prefix)
;;
esac

Expand Down Expand Up @@ -222,7 +226,7 @@ AC_EGREP_HEADER(timespec,sys/time.h,[
AC_MSG_RESULT(no)
])

AC_MSG_CHECKING([for eventfd])
AC_MSG_CHECKING([for eventfd])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <sys/eventfd.h>]],
[[eventfd (0, 0);]])
Expand All @@ -231,7 +235,18 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
AC_DEFINE(HAVE_EVENTFD, 1, Define if the OS supports eventfd(2).)
],[
AC_MSG_RESULT([no])
])
])

AC_MSG_CHECKING([for as func])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[]],
[[ asm(".func test\n\t.endfunc"); ]])
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_AS_FUNC, 1, Define if the assembly supports .func)
],[
AC_MSG_RESULT([no])
])

AC_SUBST(SHREXT, "$shrext")

Expand Down
4 changes: 1 addition & 3 deletions tests/checkasm/asm_aarch64.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
*/

/* FIXME: Copied from a single instance of configuring FFmpeg on aarch64 */
#include "config.h"
#define CONFIG_PIC 1
#define EXTERN_ASM
#define HAVE_AS_FUNC 1
#define HAVE_SECTION_DATA_REL_RO 1

#ifdef __ELF__
# define ELF
Expand Down

0 comments on commit 1612026

Please sign in to comment.