[PATCH 2/2] Changed compiler optimization flag to optimize for size

Gedare Bloom gedare at rtems.org
Thu Mar 20 14:06:09 UTC 2014


Peter,
I had the same thought, but I don't think the build system knows about
the CPP defines from the include files. We would need to add a similar
flag somewhere in the autotools/Makefile logic.

Gedare

On Thu, Mar 20, 2014 at 8:00 AM, Peter Dufault <dufault at hda.com> wrote:
> Could this be conditional on BSP_SMALL_MEMORY?  Is that known in the Makefiles?
>
> On Mar 19, 2014, at 11:48 , Gedare Bloom <gedare at rtems.org> wrote:
>
>> Ok
>>
>> On Fri, Mar 14, 2014 at 10:33 PM, James Fitzsimons
>> <james.fitzsimons at gmail.com> wrote:
>>> ---
>>> c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg b/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
>>> index bf413b3..de07e73 100644
>>> --- a/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
>>> +++ b/c/src/lib/libbsp/m68k/mrm332/make/custom/mrm332.cfg
>>> @@ -11,8 +11,8 @@ RTEMS_CPU_MODEL=mcpu32
>>> #  and (hopefully) optimize for it.
>>> CPU_CFLAGS = -mcpu=cpu32
>>>
>>> -# optimize flag: typically -O2
>>> -CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer
>>> +# using optimise for size due to small memory on target board.
>>> +CFLAGS_OPTIMIZE_V = -Os -g -fomit-frame-pointer
>>>
>>> define bsp-post-link
>>>        $(OBJCOPY) -O srec $(basename $@)$(EXEEXT) $(basename $@).srec
>>> --
>>> 1.8.3.2
>>>
>
> Peter
> -----------------
> Peter Dufault
> HD Associates, Inc.      Software and System Engineering
>



More information about the devel mailing list