Problem timing execution
Fri Jun 11 12:13:00 GMT 1999
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':
> ../../../../../src/newlib/libc/reent/timer.c:63: undefined reference to
> /usr/local/m68k-coff/lib/libc.a(timer.o): In function '_gettimeofday_r':
> ../../../../../src/newlib/libc/reent/timer.c:107: undefined reference to
> I'm using gcc-2.8.1, binutils-2.9.1, newlib-1.8.1, and libstdc++-184.108.40.206
> 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
In other configurations, such as m68k-rtems, these routines are provided
by the operating system.
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 email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc