[PATCH] sptests: Conditionally build atomic tests
Ralf Corsepius
ralf.corsepius at rtems.org
Wed Feb 13 10:54:57 UTC 2013
On 02/13/2013 09:15 AM, Sebastian Huber wrote:
> This patch does not work. On PowerPC Autoconf uses this:
>
> configure:4918: checking rtems/rtems/atomic.h usability
> configure:4918: powerpc-rtems4.11-gcc -c -mcpu=603e -Dppc603e -O2 -g -fno-keep-inline-functions -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs conftest.c >&5
> conftest.c:52:32: fatal error: rtems/rtems/atomic.h: No such file or directory
Reproducer?
> What is missing here is the -B option for the particular BSP compiler search
> path. How can I teach Autoconf to use the BSP provided flags for the compiler?
They are supposed to be propagated automatically, through a pretty
complex mechanism.
That said, this sounds as if something might have been broken elsewhere.
I can try to have a look into it later today (more likely: tomorrow).
Besides this, using AM-CONDITIONAL-ized SUBDIRS inside of a Makefile.am
is a bad idea. They usually break make-recursion. Move the CONDITIONALS
into the subdir Makefile.ams, instead.
> ---
> testsuites/sptests/Makefile.am | 14 +++++++++++---
> testsuites/sptests/configure.ac | 3 +++
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am
> index c9d20dd..86e269e 100644
> --- a/testsuites/sptests/Makefile.am
> +++ b/testsuites/sptests/Makefile.am
> @@ -27,14 +27,22 @@ SUBDIRS = \
> spintrcritical17 spintrcritical18 spmkdir spmountmgr01 spheapprot \
> spsimplesched01 spsimplesched02 spsimplesched03 spnsext01 \
> spedfsched01 spedfsched02 spedfsched03 \
> - spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \
> - spatomic01 spatomic02 spatomic03 spatomic04 spatomic05 \
> - spatomic06 spatomic07
> + spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01
> SUBDIRS += spfatal26
> SUBDIRS += speventtransient01
> SUBDIRS += speventsystem01
> SUBDIRS += spinternalerror01
> SUBDIRS += spinternalerror02
>
> +if HAS_RTEMS_ATOMIC
> +SUBDIRS += spatomic01
> +SUBDIRS += spatomic02
> +SUBDIRS += spatomic03
> +SUBDIRS += spatomic04
> +SUBDIRS += spatomic05
> +SUBDIRS += spatomic06
> +SUBDIRS += spatomic07
> +endif
> +
> include $(top_srcdir)/../automake/subdirs.am
> include $(top_srcdir)/../automake/local.am
> diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
> index a43a1ad..7687901 100644
> --- a/testsuites/sptests/configure.ac
> +++ b/testsuites/sptests/configure.ac
> @@ -22,6 +22,9 @@ RTEMS_CANONICALIZE_TOOLS
>
> RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
>
> +AC_CHECK_HEADER([rtems/rtems/atomic.h])
> +AM_CONDITIONAL(HAS_RTEMS_ATOMIC,[test x"$ac_cv_header_rtems_rtems_atomic_h" = x"yes"])
> +
> # FIXME: We should get rid of this. It's a cludge.
> AC_CHECK_SIZEOF([time_t])
>
>
Ralf
More information about the devel
mailing list