delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/04/27/06:18:51

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type; q=dns; s=default; b=vmGIS8
T33LcHFuUKilPET9vjV1oy+p5u9JCMvrtbwq839g9HnpiH6sNlQwfZXxzxmavCO3
OGvUqwKCKNijkAU8Uanl9D29cwxbTe5SRxMsAo/mUxtZwIsXSEwR4fdYneTeFZ2f
BxPFBjs/P+ptNjUlKv1KWhUiPuE2Mn8xA9mzE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type; s=default; bh=09bVsWxUMnvF
+ZozR1O7+jJUU5M=; b=PdldTNaQPISzgx/CsotF8QDZuiGvXIsGqdlGHe4Ra804
ljkLpeh+O0g+CJ2JgUdWoLLVeDUuHKY9VjHUmj/BYJVBdhkSG/wmCwnt5Q3LEUe+
SPXIujaLs7IMgQnLB96psWH9mgO2X88ZNRCWiksYibxTkzVSrfIPrJ6ZJY3ZZdw=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*i:JbWuyu0L, H*i:sk:YqZEOxk, H*f:JbWuyu0L, H*i:CAD8GWsusQNP2g5
X-HELO: mail-pf0-f196.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=PO/aNo8M7zyW+lZJHi1ir1XpbWFnkCtbsXQb7yC/Q/Y=; b=jiMyY9HzSdv2SPFRhQsPFpVStjTatfnQ+zZJ6/5yUFnJk3LHFGCisOgaitY/sMqltm W+C5BheP8/BzBp1HUGTWf8YahWV3h7GFtL+jIE/W2saeysjEwMm8fJ0xrs+3XZIIjmN5 znXwJADuqGz/+dF6SBrnZNIO9RjZrBGx8vkyjMP4+bRwLzSzaZC6Oq1KzpfBf6f5ALmr 40jKoEQmSmQSStIWwX7l0IFXj1Uh40Q2kxKJ+imomgYjYQVM0kk9CL7H01DqyyHp0E8y d9q/UdHYQQPrfDp6MIH/pLVgJuA/WT9W4R7BIko+nPLYAjLjZ4FKBwAP4JmLXaK66OlR LCJw==
X-Gm-Message-State: AOPr4FXii7BdF7MLM4AH4G/Mk4ebims1GM0zhul3L3INURj00l/Jhb84zhArufAMfQvGcw==
X-Received: by 10.98.33.207 with SMTP id o76mr10439501pfj.80.1461752300252; Wed, 27 Apr 2016 03:18:20 -0700 (PDT)
Message-ID: <572091DE.7010800@gmail.com>
Date: Wed, 27 Apr 2016 18:18:06 +0800
From: JonY <10walls AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:25.4) Gecko/20150524 FossaMail/25.1.5
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: converting from -mno-cygwin
References: <CAD8GWsuVECqpUX6_BDnKq+ueU8svKXqzG9BWHNOCj4P=e4aDyQ AT mail DOT gmail DOT com> <571FF46E DOT 6050603 AT gmail DOT com> <CAD8GWsusQNP2g5=JbWuyu0L+YqZEOxkgh1TedZkKRxUV-VRZMQ AT mail DOT gmail DOT com>
In-Reply-To: <CAD8GWsusQNP2g5=JbWuyu0L+YqZEOxkgh1TedZkKRxUV-VRZMQ@mail.gmail.com>
X-IsSubscribed: yes

--Mr1RwgkAFVm1LOBqc9vSgrKangPvDa4wm
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 4/27/2016 08:32, Lee wrote:
> On 4/26/16, JonY  wrote:
>> On 4/27/2016 05:08, Lee wrote:
>>> Questions:
>>>
>>> How to tell if I should be using libwinpthread or pthread?  I had no
>>> idea so installed both:
>>> /usr/i686-w64-mingw32/sys-root/mingw/bin
>>> $ ls -l *hread*
>>> -rwxr-xr-x 1 root None 47635 Apr  7 08:54 libwinpthread-1.dll
>>> -rwxr-xr-x 1 root None 65024 Jul  6  2013 pthreadGC2.dll
>>>
>>>
>>
>> pthreadGC2 is a compatibility left over.
>=20
> So I should uninstall it?  I have both installed now:
> mingw64-i686-pthreads                 20100619-5                    OK
> mingw64-i686-winpthreads              4.0.6-1                       OK
>=20

Sure, its there because pthreadGC was around longer than winpthreads.
Notice there is no import library for pthreadGC, it is only provided for
compatibility with any app that still use it.

> and maybe it's a problem.  I haven't tracked it down yet, but GNUmakefile=
.in has
> # PThreads library, if needed.
> PTHREAD_LIB  =3D @PTHREAD_ONLY@@PTHREAD_LIB@
>=20
> which, after running autoheader & autoconf, creates a GNUmakefile with
> # PThreads library, if needed.
> PTHREAD_LIB  =3D -lpthreadGC2
>=20
> which doesn't work :(
>=20

Fix your configure.ac assumptions.

>>> Is there a standard way to figure out if the compiler is gcc-v3 with
>>> the -mno-cygwin flag set?
>>
>> No, don't do this, it'd turn into a giant hairball fast.
>=20
> Not really.. it's just a few places that I've had to change the source
> code to deal with the differences between cygwin 1.5 + gcc v3 &
> whatever the current cygwin is + i686-w64-mingw32-gcc
>=20

You'd get into a bigger hairball when you involve 64bit Cygwin where
long is 64bit unlike the rest of the Windows world.

>>> I had to make a few changes to the code to get this far & I'd prefer
>>> to have the changes wrapped inside an #IFDEF or something.  For
>>> example, I just commented out the include since it conflicts with
>>> something
>>>
>>> #ifdef __MINGW32__
>>> /* -LR- #include "cygwin.h" */
>>> /* -LR- const char cygwin_h_rcs[] =3D CYGWIN_H_VERSION; */
>>> #endif
>>>
>>> Under cygwin 1.5, gcc -mno-cygwin  requires cygwin.h to be included.
>>> Using i686-w64-mingw32-gcc if cygwin.h is inculded gcc barfs with a
>>> conflicting definition of [i don't remember].
>>> It'd be nice if I could build using the old or new method without
>>> having to change the source code, so I'm guessing I want some kind of
>>> ifdef wrapper for the include??
>>>
>>
>> What are you even trying to do? You shouldn't mix different runtimes.
>=20
> I'm not mixing runtimes.  I'm trying to keep it so that the program
> continues to build under the old cygwin 1.5/gcc -mno-cygwin as well as
> building under the current cygwin/i686-w64-mingw32-gcc cross-compiler.
> Since I have to do different things depending on if I'm using the
> cross compiler or the old gcc -mno-cygwin I'm hoping there's a flag or
> something I can use so the exact same source code works with either
> build system.
>=20

Using Cygwin headers in purely win32 program is wrong. I understand you
are simply trying to get Cygwin version strings, it'll just end up as a
compile error if the toolchain isn't Cygwin hosted. You can try using
autoconf to run "uname -a" instead and grab that instead.




--Mr1RwgkAFVm1LOBqc9vSgrKangPvDa4wm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIcBAEBAgAGBQJXIJHoAAoJEHE7X+KcFF1FR4gP/1n8fZ7bcMg9tE4kcLiqiJM7
psKFYSGHIdM8rdCl3wUFyukzvtgNJ5i8bLfouUXRQR6uS2x0QshGtXfMetMdaqWS
fyDrGSnMwNAZTrI7tzoyXvjpWqQYupKQHQ4dU7ivd1dk8Jk+vdvyGS9/Oew9Zekp
xUbo4OiOk0fYtlz+B40t7z1grOoXKBVG6EeKDPePcJMLJzw8zBR5BF9FdRFJULqr
G/u7UgaUAca6Np3F7myK7Ff6vlofcLLiytghGCKESvPDiuKazqXw0AydnI9auNqN
EWtoCXda+6Zkug/R+CygdLzZcAq2/8vD8Qpx3I73M2EFmfiasrFQyvXn1GaOXUqX
92JwTjC4QhguZVPV6Q9o/CXjLuLP9KW44CDs/VtWhEp+onRWhIB/Id2s2mbdLSqU
jrlOEQPcHj/KBp1Ugm0xrS+QyjdiW2W5st20Q9/ZS7+DNLCktebWD/70uc3mNPtE
Rq8Q+s2yTnFVjMH33qqpwi19TeexHnaLCDoDG7NZta4qP+w7CSM+7wQIlg8n/OMJ
OgfqrIhL5hwtQj+/TeBmz0UwvEE4WhV9qoo6H/QrDAvAFgbke6Jh8Pb8uX4XMnxP
tFqQfeOvhEzUOnXJVMLkCkwWWrguY/+7y0yfZ7lTD3NmR2jc9yCRKCAfQQ0JCnhO
kQRW1dfTPeRjSS7HaZYO
=pqT3
-----END PGP SIGNATURE-----

--Mr1RwgkAFVm1LOBqc9vSgrKangPvDa4wm--

- Raw text -


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