Mail Archives: djgpp/2011/10/25/13:20:54
On 10/25/2011 07:33 PM, Ozkan Sezer wrote:
> On Tue, Oct 25, 2011 at 7:30 PM, Eli Zaretskii<eliz AT gnu DOT org> wrote:
>>> From: RayeR<glaux AT centrum DOT cz>
>>> Date: Tue, 25 Oct 2011 04:02:09 -0700 (PDT)
>>>
>>> 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?
>>
>> Can you show the error messages you get?
>>
>> It is strange that you should get any errors at all: an inline
>> function is like a macro, it disappears without a trace in the
>> compiled object code, so the linker should not complain, because
>> there's no symbol corresponding to the function for it to see any
>> multiple definitions. There simply should not be any definition at
>> all.
>>
>> Did you perhaps disable inlining, or compiled with some headers that
>> define away __inline__?
>>
>
> BTW, is the issue with 2.03 or 2.04? IIRC, 2.04 had fix applied for this.
Yes. But the fix is newer than the beta version from djgpp/beta/v2 as far as I remember
Perhaps it could be good time to release a new beta sometime.
Andris
- Raw text -