AW: [ECOS] RE: any experiences with arm gcc 3.4.1 and ecos ?
Neundorf, Alexander
Alexander.Neundorf@jenoptik.com
Wed Aug 11 11:33:00 GMT 2004
...
> (by which I meant 3.4.1). On the (unchecked) assumption that
> this is only
> called by vterminate.cc, which is for handling crashing code
> anyway, I'm
> getting successful linking by including a copy of
> newlib\libc\reent\impure.c and
> extern "C" void __cxa_pure_virtual() {while(1);}
> in my code manually. It whines a bit, but it does seem to
> work, and my
> quite simple code (dumping serial port bytes) is now running, though
> I've not
> tried to use errno.
>
> (The whining messages, which could doubtless be sorted
> relatively easily:
> impure.c:12: warning: missing initializer
> impure.c:12: warning: (near initialization for
> `impure_data._new._reent._localtime_buf.__tm_isdst')
> impure.c:12: warning: missing initializer
> impure.c:12: warning: (near initialization for `impure_data._atexit')
> )
>
> It's not a good solution, but sometimes you have to use workarounds.
> Hopefully someone will tell me what I should be doing soon.
Finally I build the toolchain myself, gcc 3.4.1, binutils 2.14 and the multilib patch for ecos. I still got the undefined reference to _impure_ptr, adding reent.c to my sources gives him a reference.
After a short test everything seems to work.
I didn't find anything about _cxa_pure_virtual(), just a note that _impure_ptr is used by the reentrant libc functions from newlib, which shouldn't be used in ecos. Additionally if it's only a undefined reference to a variable it should not matter much where this variable gets defined.
Alex
--
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