delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/05/17/07:00:24

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=l+Si31K86H6fQ6XlGPYosD3PnwC0bxPWxSmD6qwOD9w=;
b=PnZyX3Fx+hG+/X5fl7Lo7ZwuqCoKrfI96wNJLWxFSjhGGZy35ASUIk/0IUJ9BWZ4TH
JZ1SQ4Mn0PaINXe+NtadvZnGEej9wno0WJZMwVE4ocniuhFzLxSy/JoBbjmy0R8jI/zu
IABrREqylr236rm075mvRqdngCYDGOrOloZjV10bUcK46JrCELhArxNvo6kFduWbLbBo
EPIOva45oADuZzk/ffb9YJKfEcK4fnrRywCb6BluuvvyQGD0n3Y5N4lMpkRMNxofdUzF
PVjMYWUtVawoD9VNa+FgtwSymFhaUwAj2sNpaKB51PdeCmyRTiscIktJhpXe8JRZU5bD
mzEA==
MIME-Version: 1.0
X-Received: by 10.50.43.227 with SMTP id z3mr8523183igl.22.1431860417400; Sun,
17 May 2015 04:00:17 -0700 (PDT)
In-Reply-To: <555870E8.7040302@iki.fi>
References: <201505042003 DOT t44K3odg011007 AT delorie DOT com>
<CAA2C=vAjN-HamFRWCQak=QF_NPjR5-TBYZw1U5707MO0b=qXkw AT mail DOT gmail DOT com>
<554DF584 DOT 4020309 AT iki DOT fi>
<CAA2C=vDaOJb_RW2bQEFoM_cqwp7yhzwX-CB328r5GCCi6XcooA AT mail DOT gmail DOT com>
<55501DAD DOT 1080604 AT iki DOT fi>
<CAA2C=vAvMW-yquZLSN=Z39NU24Kqf7urjan90801i7BDTdqOvQ AT mail DOT gmail DOT com>
<55579278 DOT 8090301 AT iki DOT fi>
<CAA2C=vBaQKzmch_buxFm20DJLcG+zv6d6803+qMEx=baA4Frog AT mail DOT gmail DOT com>
<555829A6 DOT 8010502 AT iki DOT fi>
<CAA2C=vA73qPvoDFytp3FeW6bCD1-XuGsFFoDinoKn2KYY1fkow AT mail DOT gmail DOT com>
<555870E8 DOT 7040302 AT iki DOT fi>
Date: Sun, 17 May 2015 14:00:17 +0300
Message-ID: <CAA2C=vDhD6BJj89o1i0FRd2U0H4bTpGGN4zH6qs7FJKxzqhuQg@mail.gmail.com>
Subject: Re: ANNOUNCE: DJGPP 2.05 beta 1
From: "Ozkan Sezer (sezeroz AT gmail DOT com)" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 5/17/15, Andris Pavenis (andris DOT pavenis AT iki DOT fi) <djgpp AT delorie DOT com> wrote:
> On 05/17/2015 11:45 AM, Ozkan Sezer (sezeroz AT gmail DOT com) wrote:
>> On 5/17/15, Andris Pavenis (andris DOT pavenis AT iki DOT fi) <djgpp AT delorie DOT com>
>> wrote:
>>> On 05/16/2015 10:56 PM, Ozkan Sezer (sezeroz AT gmail DOT com) wrote:
>>>> On 5/16/15, Andris Pavenis (andris DOT pavenis AT iki DOT fi) <djgpp AT delorie DOT com>
>>>> wrote:
>>>>> with gcc >= 4.8?
>>>>> If we define own _rdtsc() we get duplicate definition of it when GCC
>>>>> own
>>>>> header x86intrin.h is also
>>>>> included (for new GCC version). That was the reason why I used GCC
>>>>> defined
>>>>> function instead
>>>>> of DJGPP one.
>>>>>
>>>>> Can you please show the error or warning messages form each
>>>>> problematic case?
>>>>>
>>>>> I tried to reproduce the problems: commented out the -I$(GCC_INC_DIR)
>>>>> additions to CFLAGS in both src/ and tests/makefile.in, compiled src
>>>>> using my gcc5 cross-compiler and got no errors or warnings for
>>>>> _rdtsc()
>>>>> Tried compiling the test programs: since I am on linux, had to do some
>>>>> voodoo in the makefiles by changing gcc and ld to cross- versions and
>>>>> by replacing rem.com with /bin/true, they just compiled. (of course,
>>>>> no run tests, and found other issues, but no _rdtsc() issues.)
>>> I do not remember exactly with which piece of software I got this
>>> problem
>>> with _rdtsc
>>>
>>> With DJGPP own _rdtsc the following 2 includes causes compile error:
>>>
>>> #include <x86intrin.h>
>>> #include <time.h>
>>>
>>> One should be able to use SSE/MMX/AVX instructions with DJGPP.
>>>
>>> ia32intrin.h defines _rdtsc() and as result one gets duplicate definition
>>> if
>>> one includes
>>> x86intrin.h before time.h without that change (including x86intrin.h
>>> instead
>>> of defining _rdtsc()).
>>>
>>> There is fortunately another way without including x86intrin.h from
>>> time.h:
>>>
>>> ia86intrin.h contains '#define _rdtsc() __rdtsc()' and it defines __rdtsc
>>> as
>>> an inline function.
>>> One could also undefine _rdtsc before defining our own.
>>>
>>> Andris
>>>
>>>
>>
>> How about something like the following:  when building djgpp, keep our
>> version of _rdtsc(), but for users defer to gcc's version:
>
> I already committed change which avoid to include x86intrin.h at all. So
> also
> -Wcat-qual related warnings from GCC MMX/SSE/AVX related stuff no more
> matter.
>

OK,

> About removing GCC own include directory from header files search path:
>
> I would prefer not to do it. The idea of -nostdinc was to tell GCC not to
> look-up
> installed DJGPP header files but use ones from build directory added from
> command line.
> GCC include files is a different stuff and should not be removed from
> look-up.
> It is better to have them included in the same way as it is done when
> building
> user applications.
>
> Andris
>

As I said in earlier in this thread, gcc's own headers (e.g. float.h) undefine
stuff from djgpp's headers and the resulting binaries differ, e.g. for DBL_MIN
and DBL_MAX.  I don't like this.  DJ, what do you think?

--
O.S.

- Raw text -


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