kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08974
Re: gcc 4.7.x and optimization flags
On 10/16/2012 12:31 AM, Dick Hollenbeck wrote:
> On 10/15/2012 08:49 PM, Wayne Stambaugh wrote:
>> Dick,
>>
>> I just committed a fix so that the only time -O1 is only used when the
>> GCC version is >= 4.7. When you get a chance, please test it out to
>> make sure it works with GCC versions < 4.7. Both my Linux and Windows
>> build environments are using GCC >= 4.7. I suppose I could install an
>> older version of GCC on Linux when I get chance.
>>
>> Wayne
>
> Thanks for doing that. Someday we might take it even further and compile on
only (not on)
> those certain
> needed files under 4.7.x that must be done with -O1, others with -O2.
>
> This is easier than it sounds since gcc will ignore all but the right most optimization
> setting on the command line.
>
> So really, you just have to set set_source_file_properties() on a few files and pass in
> the -O1 as COMPILE_FLAGS or such (don't hold me on spelling), and as long as CMake appends
> that to other stuff, then -O1 will prevail on only those files.
>
> Dick
>
>
>
References