This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: extern __inline__ and optimisation problems
- From: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: eCos Disuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Wed, 21 Oct 2009 17:03:57 +0300
- Subject: Re: [ECOS] extern __inline__ and optimisation problems
- References: <c09652430910210257h29fc6412r1be6262942a5e253@mail.gmail.com>
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
Hi,
Nobody knows what your optimization does means, -Os, -O3, or CDLs,
e.g.
cdl_option CYGIMP_LIBC_TIME_DIFFTIME_INLINE {
user_value 0
}
...
etc.
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} &&
-Os.
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.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss