On Fri, 12 Dec 2014 11:43:59 +0100 Kees Schoenmakers <ksli...@gmail.com> wrote:
> I tried the newer msp-GCC (TI/RedHat) distribution on my project(s). > > It still builds with _far_ more code then my present msp430-gcc > (4.7.0). This compiler > has also some minor habits but produces compact code. > > So for the moment I will not switch to the newer version, my project > would not fit in the flash. > I have had similar issues in the beginning. It seems the new compiler does link in every function present in the code and libc - even if its not used, bloating up the code significantly. This however can be worked around with some additional compiler flags, to turn on link time optimization and garbage collection, which the new compiler does support, but is not turned on by default. add to compiler flags: > -fdata-sections > -ffunction-sections > -fno-asynchronous-unwind-tables > -flto and to linker flags > --gc-sections > --print-gc-sections this will cause the compiler to mark each function and data section in the resulting object file, which allows the linker to garbage collect unused functions (stripped functions are printed thanks to print-fc-sections) there are still some bugs, for example if linking a lot of code together the compiler suddenly issues a lot of > warning: visibility attribute not supported in this configuration; ignored > [-Wattributes] warnings for no apparent reason in random places in the code. This was also the case with the previous version of the TI/Redhat compiler released in the middle of the year. As far as I could see so far these linker warnings can be safely ignored, the resulting code still works and is still significantly smaller than without -flto and --gc-sections hope that helps. cheers Eric -- Eric Price TTI GmbH - TGU Smartmote Pfaffenwaldring 4 D-70569 Stuttgart Tel.: +49 0711 - 6856 5369 Fax.: +49 0711 - 6856 6818 E-mail: pr...@smartmote.de Homepage: http://www.smartmote.de ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users