X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Message-ID: <555829A6.8010502@iki.fi> Date: Sun, 17 May 2015 08:39:50 +0300 From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: ANNOUNCE: DJGPP 2.05 beta 1 References: <201505042003 DOT t44K3odg011007 AT delorie DOT com> <554DF584 DOT 4020309 AT iki DOT fi> <55501DAD DOT 1080604 AT iki DOT fi> <55579278 DOT 8090301 AT iki DOT fi> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com 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) 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 #include 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