mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 05:28:00 +00:00
Check for yield support on ARM and print helpfull error message about -march
This commit is contained in:
parent
4b47958163
commit
032e6963fe
31
configure
vendored
31
configure
vendored
@ -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"
|
||||
|
14
configure.in
14
configure.in
@ -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])
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user