Mail Archives: djgpp-workers/2009/07/25/12:25:27
11.06.2009 18:10, Juan Manuel Guerrero kirjoitti:
> While I was trying to port m4 I got for every file that includes time.h an
> error message similar to this one:
>
> builtin.o: In function `_rdtsc':
> c:/djgpp-2.04/include/time.h:107: multiple definition of `__rdtsc'
> m4.o:c:/djgpp-2.04/include/time.h:107: first defined here
>
>
> The patch below can fix the issue.
>
> Regards,
> Juan M. Guerrero
>
Is somebody going to apply the patch, or I should apply the initial version (below)?
I could add to the list of broken things (due to this problem) also gfortran
library libgfortran.a. It is not used in the build process, so build succeeds,
but the library is broken after build.
Andris
>
>
>
> diff -arU5 djgpp.orig/include/time.h djgpp/include/time.h
> --- djgpp.orig/include/time.h 2007-12-11 07:01:20 +0000
> +++ djgpp/include/time.h 2009-06-11 16:59:40 +0000
> @@ -108,13 +108,13 @@
> int select(int _nfds, fd_set *_readfds, fd_set *_writefds, fd_set *_exceptfds, struct timeval *_timeout);
> int settimeofday(struct timeval *_tp, ...);
> void tzsetwall(void);
> uclock_t uclock(void);
>
> -unsigned long long _rdtsc(void);
> +static unsigned long long _rdtsc(void);
>
> -extern __inline__ unsigned long long
> +static __inline__ unsigned long long
> _rdtsc(void)
> {
> unsigned long long result;
> __asm__ __volatile__ ("rdtsc" : "=A"(result) );
> return result;
- Raw text -