targopts.h not included ?

Ralf Corsepius corsepiu at faw.uni-ulm.de
Fri Sep 28 03:15:59 UTC 2001


Am Don, 2001-09-27 um 20.49 schrieb 1001616591:
> Puro Markku wrote:
> > 
> > Hi All,
> > 
> > I'm using modified i386ex BSP(ev386ex.cfg, more or less for learning ;)
> > for old Intel Evaluation Board (r1.0 and r2.1)
> > and rtems-ss-20010816 snapshot (Hosts: Linux and WinNT/98) with:
> > GCC      -  gcc-2.95.3
> > BINUTILS -  binutils-2.10
> > NEWLIB   -  newlib-1.9.0
> > 
> > On BSP configuration files there is definitions like...
> > --8<--------------------------------------------------------
> > *** ev386ex.cfg
> > define make-target-options
> >         @echo "/* #define NDEBUG 1       */ "           >>$@
> >         @echo "/* #define RTEMS_DEBUG  1 */"            >>$@
> >         @echo "#define BSP_DEBUG  1  "          >>$@
> >         @echo "/* #define RTEMS_TEST_NO_PAUSE 1 */"     >>$@
> >         @echo "/* #define RTEMS_TEST_IO_STREAM 1 */"    >>$@
> >         @echo "/* #define MALLOC_STATS 1 */"            >>$@
> > endef
> > --8<--------------------------------------------------------
> > that I'd like to use, but those aren't included anywhere ?
> > Should those definitions go in targopts.h file?
No. General, per-cpu-options formerly contained in make-target-options,
now are automatically generated by autoconf/autoheader and are
propagated to the sources via cpuopts.h 
(cf. ./c/src/exec/score/include/rtems/score/Makefile.am)

Similarily, per-BSP-options now are supposed to be propagated by per-bsp
headers (e.g. bsp.h), which also can apply autoconf/autoheader generated
headers 
Cf.
./c/src/lib/libbsp/i386/i386ex/include/bspopts.h.in
./c/src/lib/libbsp/sh/gensh1/include/bspopts.h.in

targopts.h currently only is kept for backward compatibility reasons and
because od the work related to the transition Joel mentions below is not
yet completed.

> > Only place where I find that targopts.h file is included
> > was in system.h file but not for __i386__ ?
Right, targopts.h is depredicated, those cpus still generally applying 
targopts.h (esp. the powerpc) would need more work.

> > --8<--------------------------------------------------------
> > **** system.h
> > #if defined(_AM29K) \
> >   || defined(__hppa__) \
> >   || defined(__h8300__) \
> >   || defined(__i960__) \
> >   || defined(__mc68000__) \
> >   || defined(__sh__) \
> >   || defined(__sparc__) \
> >   || defined(__i386__)
> >   /* these cpus are ready to apply cpuopts.h */
> > #include <rtems/score/cpuopts.h>
> > #else
> >   /* fallback to targopts.h for mips and powerpc */
> > #include <rtems/score/targopts.h>
> > #endif
> > --8<--------------------------------------------------------
> > 
> > Btw. targopts.h seems to include cpuopts.h file anyhow?
Yes, it does.
cf. ./c/src/lib/libbsp/include/rtems/score/Makefile.am

But .. simply don't use it :)

> You have caught an instance in time where we are trying to transition
> from the building RTEMS only for a BSP to being able to build it
> multilib and provide it as an addon library separate from the BSPs.
> 
> You should modify a bsp specific .h file to get special defines
> now.

Ralf





More information about the users mailing list