From 10ae124ce1e9ec42477cb828a898e9a1207e839a Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 5 Apr 2004 06:12:14 +0000 Subject: 2004-04-05 Ralf Corsepius * configure.ac: Add AC_CHECK_SIZEOF([CPU_CONTEXT]..). Add SIZEOF_CPU_CONTEXT to cpuopts.h. Add RTEMS_PROG_CCAS. * acinclude.m4: Use unquoted "here" document to propagate $3 to cpuopts.tmp. --- cpukit/configure.ac | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'cpukit/configure.ac') diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 4d6aacdcb4..27c0133c68 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -32,6 +32,7 @@ else fi RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]) +RTEMS_PROG_CCAS RTEMS_CANONICALIZE_TOOLS AM_PROG_CC_C_O AC_PROG_RANLIB @@ -89,6 +90,22 @@ AC_CHECK_FUNCS([strsep strcasecmp snprintf]) AC_CHECK_FUNCS([bcopy bcmp]) AC_CHECK_FUNCS([isascii fileno]) +AS_IF([test x"${RTEMS_CPU}" = x"unix"],[ +## The code fragment below had been used in tools/cpu/unix/gensize.c. +## FIXME: +## * The pad very likely is not necessary. +AC_CHECK_SIZEOF([CPU_CONTEXT],[],[ +#include +#include + +typedef struct { + jmp_buf regs; + int isr_level; + int pad[4]; /* just in case */ +} CPU_CONTEXT; +]) +]) + cat >>cpuopts.tmp <<\_ACEOF /* target cpu dependent options file */ /* automatically generated -- DO NOT EDIT!! */ @@ -146,6 +163,11 @@ RTEMS_CPUOPT([RTEMS_VERSION], ["]_RTEMS_VERSION["], [RTEMS version string]) +RTEMS_CPUOPT([SIZEOF_CPU_CONTEXT], + [test x"$RTEMS_CPU" = x"unix"], + [$ac_cv_sizeof_CPU_CONTEXT], + [The size of a 'CPU_CONTEXT', as computed by sizeof]) + cat >>cpuopts.tmp <<\_ACEOF #endif -- cgit v1.2.3