Makefiles

Till Straumann strauman at slac.stanford.edu
Mon Oct 25 16:17:01 UTC 2004


You can use multiple -O options on the gcc command line with
the last one winning.

Hence, in your Makefile you could just say

CFLAGS += -O0

(minus capitalO zero)

HTH
-- Till

Note that some compiler versions might need a minimal
level of optimization for inline assembly.

James Yates wrote:
> I am currently using RTEMS on a custom platform which is fully working
> and I am very pleased with results. I have a problem though. I am
> building my application and linking it against RTEMS and all is lovely.
> However, my default CFLAGS has level 1 optimisation turned on, but I
> want to compile a couple of source files with no optimisation. Can
> anyone suggest how I can modify my makefiles to accomadate this since
> the optimisation flag in CFLAGS comes from the BSP. I thought of
> specifying, in my application makefile, something like a
> NON_OPT_C_PIECES which could be compiled slightly differently, but I am
> unsure about how to make the low level RTEMS makefile infrastructure
> include this within the build. Can anyone help?
> 
> 
> 	many thanks in advance.
> 
> 		James Yates
> 
> 





More information about the users mailing list