[ECOS] Re: MPC860 + gcc 3.3.2 + STLPort

Tony Butt tjb@cea.com.au
Thu Aug 12 03:11:00 GMT 2004



> -----Original Message-----
> From: ecos-discuss-owner@ecos.sourceware.org 
> [mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of 
> Øyvind Harboe
> Sent: Wednesday, 11 August 2004 6:18 PM
> To: Tony Butt
> Cc: ecos-discuss@sources.redhat.com
> Subject: [ECOS] Re: MPC860 + gcc 3.3.2 + STLPort
> 
> 
> On Wed, 2004-08-11 at 04:25, Tony Butt wrote:
> > I followed Oyvind's directions some time ago to enable 
> STLPort with ecos,
> > and I have a few questions regarding this configuration:
> > 
> > 1) Exception handling seems to be totally broken with this 
> compiler. Any
> > thrown exception of the  form 
> > 	throw ("Error Message");
> > is never caught. I have compiled ecos with -fno-exceptions, 
> and those parts
> > of my application which need exceptions with -fexceptions - 
> is this likely
> > to be an issue. If not, is this a known issue, or is there 
> a workaround for
> > this.
> 
> The eCos GCC toolchain only works in the single threaded case 
> out of the
> box.
> 
> Is that the problem you're running into?
> 

Perhaps. My application starts up with several threads by default, and when
an exception occurs in even a simple application (main only), no handler can
be found, and exit() is called.

I'll try your patches, and see if they help...

> 
> I don't agree. Not having exceptions is a severe limitation in taking
> full advantage of C++/STL.
> 
> > 2) strstreams seems to cause a link problem when an integer 
> data type is
> > used, eg
> >   /home/tjb/ecos2.0/v681/STLport/src/locale_impl.cpp:45: 
> multiple definition
> > of `_STL::num_put<char, _STL::ostreambuf_iterator<char,
> > _STL::char_traits<char> > >::id'
> >
> > 3) iostreams causes a linker failure (crash) when an 
> integer data type is
> > used.
> 
> Unfamiliar. Do you have a more complete test case?

The behaviour seems to change form application to application

Attached are 2 samples, with the following build lines:

[sw-manx] examples > make -k
powerpc-eabi-g++ -c   -D__ECOS__=1 -I../STLport/stlport
-I../ecos/v681_install/include -DCEA_V694 -DPOWERPC -msoft-float -mcpu=860
-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions -fvtable-gc -finit-priority  -O0 -fexceptions hello1.cpp

powerpc-eabi-g++ -nostartfiles -L../ecos/v681_install/lib -Ttarget.ld
-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static hello1.o
-L../STLport/lib -lstlport_ecos -o hello1.elf
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
make: *** [hello1.elf] Error 1

powerpc-eabi-g++ -c   -D__ECOS__=1 -I../STLport/stlport
-I../ecos/v681_install/include -DCEA_V694 -DPOWERPC -msoft-float -mcpu=860
-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti
-fno-exceptions -fvtable-gc -finit-priority  -O0 -fexceptions hello2.cpp

powerpc-eabi-g++ -nostartfiles -L../ecos/v681_install/lib -Ttarget.ld
-msoft-float -mcpu=860 -g -nostdlib -Wl,--gc-sections -Wl,-static hello2.o
-L../STLport/lib -lstlport_ecos -o hello2.elf
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
make: *** [hello2.elf] Error 1
make: Target `all' not remade because of errors.

Maybe I need a new linker... :-(
> 
> Which eCos are you using? CVS HEAD?
Yes, or at least as of 2 weeks ago.
> 

Thanks,

Tony Butt
CEA Technologies
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello1.cpp
Type: application/octet-stream
Size: 223 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20040812/53dab8e5/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello2.cpp
Type: application/octet-stream
Size: 343 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/ecos-discuss/attachments/20040812/53dab8e5/attachment-0001.obj>
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list