Skip to content

GCC ARM optimization flag should be -Os, not -O2 for GCC versions later than 4.5.3 #664

@bikeNomad

Description

@bikeNomad

The bug referenced in workspace_tools/toolchains/gcc.py

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762

has been fixed a long time ago (v 4.5.3) in ARM GCC.
Because of this, we should consider changing the optimization from -O2 to -Os

Also, latest versions of ARM GCC (4.8) have added the -Og option, which is described as "Optimize for debugging experience rather than speed or size"; this results in considerably smaller code than the current -O0 optimization when DEBUG is set.

Perhaps some way could be added to allow those of us who are debugging and using later ARM gcc versions to use -Og instead of -O0?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions