X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=configure.ac;h=5b4322bab2c9c184b5c5e87ac12df82807382b8a;hp=46770c5d3adfa23b99955dccd29a0c9e4fbc8ad8;hb=aee1715b914e5f4ba5003079d5d954ef2209f04e;hpb=ec5e2d14f9f53372f97cb7347d5f343ae0bdd0ad diff --git a/configure.ac b/configure.ac index 46770c5..5b4322b 100644 --- a/configure.ac +++ b/configure.ac @@ -78,7 +78,14 @@ AS_IF([test "$host_cpu" = "armv7l"],[ # ARM-specific checks AS_IF([test "x$ARCHTYPE" = "xarm"],[ AC_MSG_CHECKING([for dmb instruction]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]], [[asm volatile("dmb":::"memory");]])],[ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + int main() + { + asm volatile("dmb":::"memory"); + return 0; + } + ]]) + ],[ AC_MSG_RESULT([yes]) AC_DEFINE([CONFIG_RCU_ARM_HAVE_DMB], [1]) ],[ @@ -104,7 +111,6 @@ AS_IF([test "x$ARCHTYPE" = "xx86"],[ AC_MSG_CHECKING([for sys_futex()]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include - ]],[[ #ifndef __NR_futex #error "futexes not available" #endif @@ -176,8 +182,11 @@ AC_CHECK_FUNCS([sched_setaffinity],[ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #define _GNU_SOURCE #include - ]],[[ - cpu_set_t foo; CPU_ZERO (&foo); + int main() + { + cpu_set_t foo; CPU_ZERO (&foo); + return 0; + } ]]) ],[ # Works! @@ -192,9 +201,12 @@ AC_CHECK_FUNCS([sched_setaffinity],[ AC_MSG_CHECKING([how many arguments sched_setaffinity takes]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include - ]],[[ - cpu_set_t foo; - sched_setaffinity (0, sizeof (foo), &foo); + int main() + { + cpu_set_t foo; + sched_setaffinity (0, sizeof (foo), &foo); + return 0; + } ]]) ], [sched_set_affinity_args=3],