passing -D's through configure

Ralf Corsepius corsepiu at faw.uni-ulm.de
Fri Sep 5 05:14:58 UTC 2003


On Thu, 2003-09-04 at 22:27, Harris, Andrew wrote:
> Hi -
> 
> 	How do I enable DEBUG flags when I compile a BSP?  I want to enable
> things like "SHOW_MORE_INIT_SETTINGS", "TEST_RAW_EXCEPTION_CODE", and
> "DEBUG", etc.
> 	But I can't figure out how to do this through configure.  The
> configure help says there are things like "CFLAGS_FOR_BUILD",
> "CFLAGS_FOR_HOST", and "CFLAGS_FOR_TARGET", but if I want to build a BSP
> (mvme2307), which of these should I use?
CFLAGS_FOR_* are global and get propagated into all Makefiles.

Ie. if you specify CFLAGS_FOR_*, these flags will be used for all
components in RTEMS which apply one of these flags.

*_FOR_BUILD are applied to build-system-compiled subpackages.
*_FOR_HOST are applied to host-system-compiled subpackages.
*_FOR_TARGET are applied to target-system-compiled subpackages.

[Cf. README.cdn-X in RTEMS source-tree]

I.e. there currently is no means to pass individual CFLAGS to a BSP.

In your case (passing CFLAGS to BSPs") CFLAGS_FOR_TARGET is applicable
for what you are looking for.

Another way is to extend a BSP's configure script to accept individual
configure-options (cf. BSPOPTS_* in
c/src/lib/libbsp/sparc/erc32/configure.ac)

Then you can set these options at configuration time by using something
similar to this:
<path>/configure [more options] MYBSP_FLAG=2

Ralf





More information about the users mailing list