Commit 032e6963 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Check for yield support on ARM and print helpfull error message about -march

parent 4b479581
Pipeline #5528 passed with stages
in 9 minutes and 43 seconds
......@@ -13618,6 +13618,37 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
fi
#
# Check for yield support on ARM processors
#
case $host in #(
arm*) :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for yield instruction support" >&5
$as_echo_n "checking for yield instruction support... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
__asm__ __volatile__ ("yield")
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
as_fn_error $? "no, try adding -march=native or -march=armv7-a to CFLAGS (see PLATFORM.md for more information)" "$LINENO" 5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; #(
*) :
;;
esac
for ac_func in sysctlbyname
do :
ac_fn_c_check_func "$LINENO" "sysctlbyname" "ac_cv_func_sysctlbyname"
......
......@@ -460,6 +460,20 @@ AC_C_INLINE
AC_C_VOLATILE
AC_C_FLEXIBLE_ARRAY_MEMBER
#
# Check for yield support on ARM processors
#
AS_CASE([$host],
[arm*],[
AC_MSG_CHECKING([for yield instruction support])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[]],
[[__asm__ __volatile__ ("yield")]]
)],
[AC_MSG_RESULT([yes])],
[AC_MSG_ERROR([no, try adding -march=native or -march=armv7-a to CFLAGS (see PLATFORM.md for more information)])])])
AC_CHECK_FUNCS([sysctlbyname])
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment