Re: mspg++ and c++ includes

Paul Sokolovsky <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <20130611123900.15a9b549@x34f>
Hello,

On Mon, 10 Jun 2013 17:23:00 -0700
Thomas Taranowski <[email protected]> wrote:

> Thanks for the comment Paul.  What are you using for your compiler
> flags?  I'm having a couple issues with mine.
> 
> I'm currently using the following:
> -ffunction-sections -fdata-sections -DGCC_MSP430 -Wall -fno-exceptions
> -fno-rtti -fno-enforce-eh-specs -nodefaultlibs

Well, I'm using:

msp430-g++ -I../include/   -mmcu=msp430g2553 -O1 -g -Wreturn-type -ffunction-sections -fdata-sections -DHW_CONFIG=\"hw_config_msp430.hpp\" -fno-exceptions -c blink.cpp -o bin-msp430/blink.o
msp430-gcc -mmcu=msp430g2553 -Wl,--gc-sections -Wl,-Map=bin-msp430/blink.map,--cref  bin-msp430/blink.o   -o bin-msp430/blink

(I was shocked to see that Energia doesn't pass -fno-exceptions, but I
myself don't pass -fno-rtti, that needs to be fixed).

> 
> This works well in with -O2 specified (release build), but fails with
> memset undefined when running my -O0 debug build.  Presumably the
> optimized version is using the built-in library.  Also, I can't seem
> to get printf back in by adding -lgcc -lc.to the linker flags, as I
> think these get ignored after specifying the -nodefaultlibs argument.
> I really want something to just disable the libstdc++ include.
> Thomas Taranowski | 425-442-9209 | skype: thomas.taranowski |
> baringforge.com
> 

-- 
Best regards,
 Paul                          mailto:[email protected]

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.