Place to specify compiler flags
Aaron J. Grier
aaron at frye.com
Mon Sep 10 18:43:37 UTC 2001
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":
--- 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)" \
"LDFLAGS_DEBUG=$(LDFLAGS_DEBUG_V)" $(TARGET_VA)
profile:
--
Aaron J. Grier | Frye Electronics, Tigard, OR | aaron at frye.com
"In a few thousand years people will be scratching their heads
wondering how on earth the first computer was invented and
bootstrapped without a prior computer to do it with."
-- Chris Malcolm, on comp.arch
More information about the users
mailing list