← Back to team overview

kicad-developers team mailing list archive

Re: Cut out doesn't seem to work

 

On 11/29/2012 11:41 AM, Fabio Varesano wrote:
>> Try to rebuild Kicad makefiles from the scratch.
>> cmake should take in account the gcc version to set the optimization
>> level:
>> -O2 for gcc version until 4.6
>> -O1 for gcc >= 4.7
>>
> 
> Thanks for the suggestion.. however, since I'm compiling Kicad using
> MAKE_BUILD_TYPE=Debug and by looking at CMakeLists.txt:
> 
>> if(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
>>         set(KICAD_GCC_RELEASE_BUILD_FLAGS "-Wno-narrowing -O1")
>>         set(KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing")
>>     endif()
> 
> Then, it seems that -O1 won't be set if you build as Debug which makes
> sense.

I don't see the cut out problem on debug builds using GCC 4.7.2 on
MinGW.  I believe that this is either due to optimizations being
disabled by CMake on debug builds or the default GCC settings on MinGW.
 I did not check this on Linux so I don't know if the default GCC
settings vary from platform to platform.  The can even vary from distro
to distro if the GCC spec file is used used.  You can use gcc -dumpspecs
to see what defaults your system is using.  I did take a quick look the
the CMakeCache.txt file and the only compiler option for debug builds is
-g which adds the debugging information.

Wayne

> 
> Thanks!
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



Follow ups

References