Place to specify compiler flags

Ralf Corsepius corsepiu at faw.uni-ulm.de
Tue Sep 11 04:00:31 UTC 2001


On Mon, 2001-09-10 at 20:43, Aaron J. Grier wrote:
> On Mon, Sep 10, 2001 at 06:14:19PM +0200, Ralf Corsepius wrote:
> > On Mon, 2001-09-10 at 17:30, peter.o.mueller at gmx.de wrote:
> > > Hello,
> > > 
> > > I've some problems to find out where compiler flags are set. Is there an
> > > example showing how to set flags for c targets and c++ targets for
> > > debug/optimize/profile.
> > For usage inside of the source-tree and with the
> > user-makefile-fragments/ templates, your BSP's make/custom/*.cfg is the
> > place to set them.
> > 
> > The relevant make-variables are:
> > CFLAGS_OPTIMIZE_V
> > CFLAGS_DEBUG_V
> > CFLAGS_PROFILE_V.
> 
> I had to modify make/leaf.cfg in 4.5.0 to respect CFLAGS_OPTIMIZE_V when
> doing a "make debug":

Well,

1. make/leaf.cfg is not used at all inside of the source-tree :)
2. make VARIANT=DEBUG is not supposed to honor CFLAGS_OPTIMIZE_V.

> --- 0.13/make/leaf.cfg Fri, 29 Sep 2000 20:11:24 -0700 kaben
> (rtems/l/45_leaf.cfg 1.1 664)
> +++ 0.14(w)/make/leaf.cfg Thu, 02 Aug 2001 14:42:51 -0700 aaron
> (rtems/l/45_leaf.cfg 1.2 664)
> @@ -49,7 +49,7 @@
>  debug:
>         $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=o-debug" \
>        "CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \
> -      "CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)" \
> +      "CFLAGS_OPTIMIZE=$(CFLAGS_DEBUG_OPTIMIZE_V)" \

3. CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V) should be correct (I vaguely
recall that there had been a bug somewhere else which prevented it from
working)

4. CFLAGS_DEBUG_OPTIMIZE_V is gone in post-4.5.0 versions.

Ralf





More information about the users mailing list