delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/10/25/07:15:26

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: RayeR <glaux AT centrum DOT cz>
Newsgroups: comp.os.msdos.djgpp
Subject: _rdtsc(void) inline function in time.h - cause problem with multiple
definition during linking
Date: Tue, 25 Oct 2011 04:02:09 -0700 (PDT)
Organization: http://groups.google.com
Lines: 18
Message-ID: <4ce51722-c2fd-4fe0-8cb9-ebae498c3271@r1g2000yqm.googlegroups.com>
NNTP-Posting-Host: 90.181.199.10
Mime-Version: 1.0
X-Trace: posting.google.com 1319540529 23727 127.0.0.1 (25 Oct 2011 11:02:09 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Tue, 25 Oct 2011 11:02:09 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: r1g2000yqm.googlegroups.com; posting-host=90.181.199.10; posting-account=Q0wMHAoAAADjYrghh94FTf6YnbpTqZgp
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HUALESNKRC
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19)
Gecko/20110420 SeaMonkey/2.0.14,gzip(gfe)
Bytes: 1757
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,
during compiling large sources I run into troubles with multiple
_rdtsc(void) definition during linking. The problem is caused when in
1st stage is compiled a library that includes time.h and then in 2nd
stage is compiled main app that also includes time.h Because there is
_rdtsc() code already in library linker got confused what to use.

Do you think it should be fixed DJGPP time.h header to redefine

extern __inline__ unsigned long long
_rdtsc(void)
{
  unsigned long long result;
  __asm__ __volatile__ ("rdtsc" : "=A"(result) );
  return result;
}

to static?

- Raw text -


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