From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29772 invoked by alias); 27 Apr 2016 10:18:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 29647 invoked by uid 89); 27 Apr 2016 10:18:32 -0000 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 Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 27 Apr 2016 10:18:22 +0000 Received: by mail-pf0-f196.google.com with SMTP id r187so4758718pfr.2 for ; Wed, 27 Apr 2016 03:18:21 -0700 (PDT) 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) Received: from ?IPv6:2001:e68:4075:5d8b:e01f:8e6d:cdca:d0e5? ([2001:e68:4075:5d8b:e01f:8e6d:cdca:d0e5]) by smtp.gmail.com with ESMTPSA id dy6sm5344100pab.48.2016.04.27.03.18.18 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 03:18:19 -0700 (PDT) Message-ID: <572091DE.7010800@gmail.com> Date: Wed, 27 Apr 2016 12:49:00 -0000 From: JonY <10walls@gmail.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@cygwin.com Subject: Re: converting from -mno-cygwin References: <571FF46E.6050603@gmail.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Mr1RwgkAFVm1LOBqc9vSgrKangPvDa4wm" X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00616.txt.bz2 --Mr1RwgkAFVm1LOBqc9vSgrKangPvDa4wm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-length: 3284 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" Content-length: 801 -----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--