Hi, as indicated earlier, there is an issue with uClibc from the blackfin distribution: AC_TRY_COMPILE succeeds, but linking later on fails.
So my suggestion is to try to link already during configure (and test for missing defines differently). Jan
Index: configure.in =================================================================== --- configure.in (Revision 2571) +++ configure.in (Arbeitskopie) @@ -516,12 +516,12 @@ AC_CACHE_VAL(ac_cv_sched_setaffinity, save_CFLAGS="$CFLAGS" CFLAGS="-Wimplicit-function-declaration -Werror -D_GNU_SOURCE" - [AC_TRY_COMPILE([#include <sched.h>], + [AC_TRY_LINK([#include <sched.h>], [cpu_set_t cpu_set; sched_setaffinity(0, sizeof(cpu_set), &cpu_set);], [ac_cv_sched_setaffinity=new], [ac_cv_sched_setaffinity=bad])] if test $ac_cv_sched_setaffinity = bad ; then - [AC_TRY_COMPILE([#include <sched.h>], + [AC_TRY_LINK([#include <sched.h>], [cpu_set_t cpu_set; sched_setaffinity(0, &cpu_set);], [ac_cv_sched_setaffinity=old], [ac_cv_sched_setaffinity=no])] Index: src/testsuite/switchtest/switchtest.c =================================================================== --- src/testsuite/switchtest/switchtest.c (Revision 2571) +++ src/testsuite/switchtest/switchtest.c (Arbeitskopie) @@ -27,8 +27,10 @@ typedef unsigned long cpu_set_t; #endif #define do_sched_setaffinity(pid,len,mask) 0 +#ifndef CPU_ZERO #define CPU_ZERO(set) do { *(set) = 0; } while(0) #define CPU_SET(n,set) do { *(set) |= (1 << n); } while(0) +#endif #endif /* HAVE_OLD_SETAFFINITY */ #endif /* HAVE_RECENT_SETAFFINITY */ Index: src/testsuite/clocktest/clocktest.c =================================================================== --- src/testsuite/clocktest/clocktest.c (Revision 2571) +++ src/testsuite/clocktest/clocktest.c (Arbeitskopie) @@ -18,6 +18,7 @@ #include <errno.h> #include <pthread.h> +#include <sched.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> @@ -35,8 +36,10 @@ typedef unsigned long cpu_set_t; #endif #define sched_setaffinity(pid, len, mask) do { } while (0) +#ifndef CPU_ZERO #define CPU_ZERO(set) memset(set, 0, sizeof(*set)) #define CPU_SET(n, set) do { } while (0) +#endif #endif /* !HAVE_OLD_SETAFFINITY */ #endif /* !HAVE_RECENT_SETAFFINITY */
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core