From 16120269022ce817b734346a6cfafa10e020bd50 Mon Sep 17 00:00:00 2001 From: Arnaud de Turckheim Date: Mon, 5 Feb 2024 10:38:07 +0100 Subject: [PATCH] checkasm: detect configuration for aarch64 --- configure.ac | 19 +++++++++++++++++-- tests/checkasm/asm_aarch64.S | 4 +--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 4c1d5fa67..082514be6 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,7 @@ case "${host_os}" in ARCH_X86_64=1 ;; esac + AC_DEFINE(EXTERN_ASM, _, Mangling prefix) ;; *mingw32*) case "${host}" in @@ -62,6 +63,7 @@ case "${host_os}" in ARCH_X86_64=1 ;; esac + AC_DEFINE(EXTERN_ASM, , Mangling prefix) ;; *) case "${host}" in @@ -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 @@ -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 ]], [[eventfd (0, 0);]]) @@ -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") diff --git a/tests/checkasm/asm_aarch64.S b/tests/checkasm/asm_aarch64.S index 9c99e502d..78df462f8 100644 --- a/tests/checkasm/asm_aarch64.S +++ b/tests/checkasm/asm_aarch64.S @@ -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