This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Problem timing execution



On Fri, 11 Jun 1999, Timothy Rost wrote:

> I am trying to time the execution of my program to compare the
> efficiency of different compilers.  However,  I keep getting error while
> trying to compile.
> 
> Here is a small bit from my code ...
> 
> #include <time.h>
> clock_t clk;
> clk = clock();
> 
> Whenever I add the clk = clock() line I get the following errors during
> compilation; otherwise it compiles fine.
> 
> /usr/local/m68k-coff/lib/libc.a(timer.o): In function '_times_r':
> /usr/local/src/m68k/build/m68k-coff/newlib/libc/reent/
> ../../../../../src/newlib/libc/reent/timer.c:63: undefined reference to
> 'times'
> /usr/local/m68k-coff/lib/libc.a(timer.o): In function '_gettimeofday_r':
> /usr/local/src/m68k/build/m68k-coff/newlib/libc/reent
> ../../../../../src/newlib/libc/reent/timer.c:107: undefined reference to
> 'gettimeofday'
> 
> I'm using gcc-2.8.1, binutils-2.9.1, newlib-1.8.1, and libstdc++-2.8.1.1
> running of RedHat Linux 5.1
> 
> Any ideas would be greatly appreciated.

Newlib assumes that certain routines are provided by the OS or board
depedendent code.  In the m68k-coff configuration, it is strictly the
responsibility of the board dependent code (see libgloss) to provide
these.

In other configurations, such as m68k-rtems, these routines are provided
by the operating system.

--joel
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985


_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]