[ECOS] extern __inline__ and optimisation problems

Sergei Gavrikov sergei.gavrikov@gmail.com
Wed Oct 21 13:59:00 GMT 2009

On Wed, Oct 21, 2009 at 11:57:40AM +0200, Øyvind Harboe wrote:
> What does "extern __inline__" mean?
> When I build w/linux synthetic target I get lots of linker
> errors:
> ./.libs/libopenocd.a(non_cfi.o): In function `difftime':
> /tmp/ecosboard/synth/install/include/cyg/libc/time/time.inl:583:
> multiple definition of `difftime'
> ecosboard.o:/tmp/ecosboard/synth/install/include/cyg/libc/time/time.inl:583:
> first defined here


Nobody knows what your optimization does means, -Os, -O3, or CDLs,

    user_value 0



I just tried

ecosconfig new linux all
vi ecos.ecc ;# tweak the _guessed_ optim CDLs

make -C language/c/libc/time/current tests

and I could not reproduce the issue. eCos LIBC time tests were built
sucessfully even with CYGIMP_LIBC_TIME_DIFFTIME_INLINE == {0,1} &&

But, I noticed .libs/libopenocd.a the above (it seems for me that is
the gnu's autotools imprint), may be that build used the host's
<sys/time.h>, e.g., if HAVE_SYS_TIME_H defined, or host's <time.h>.
May be you use a mixture of headers in the builds libopenocd.a and
libtarget.a (i.e. host's & eCos'es) ?

> Also when I tried to upgrade from an older arm-elf to arm-eabi, I ran
> into the same problem.

I'm sorry, but, you do not provide enough of details to reproduce the
issue with any toolchain.


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