delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2009/07/25/12:25:27

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
Message-ID: <4A6B2F30.9020605@iki.fi>
Date: Sat, 25 Jul 2009 19:13:36 +0300
From: Andris Pavenis <andris DOT pavenis AT iki DOT fi>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: multiple definitions of _rdtsc
References: <20090611151046 DOT 27260 AT gmx DOT net>
In-Reply-To: <20090611151046.27260@gmx.net>
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019