delorie.com/archives/browse.cgi | search |
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:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to:content-type; q=dns; s=default; b=Sh | |
cVHMPqquIxcopFj6KhacZ04GKg5tZU0uB1J3v0NaDBre1SY5Cku+x0Yv4EnpBLc4 | |
/1n02nWg+WR9An+U7z2xIZdt9JsTDxRLbNQfLoQo5kF8QwrD6yZDRFTPwqvGLOvN | |
SEQP2PvwGf5O9GdUXX02gjJk4Y0yRpDa6Ll08I3ro= | |
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:mime-version:in-reply-to:references:date | |
:message-id:subject:from:to:content-type; s=default; bh=ZN1/qIj5 | |
VjgzCPNjeVj6aRs06oM=; b=fRdUr/O203Kk9VCwsxHIq2aJCBiAM+CvNoTBuRoS | |
YzFo9WT0HwC6Tz8kDoUGZh33KZzXtCZBCN0Seus1MHjgCkqudoPF7vTbkXu4pfeE | |
nksc2DUFhNTRtFybLIKD8H2KzBRl89fz6bTLvQElf5vPYdXaKsDqC5ePPTFwn+k/ | |
esQ= | |
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=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:3441, H*i:sk:571FF46, H*f:sk:571FF46, Questions |
X-HELO: | mail-wm0-f52.google.com |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=OT+kwZkjLA0XHgFg+eTsM0eh4x/BO4FpQek/IPgvFos=; b=S5D+00IeGHsBb9tH1g86IehOEczqDMjn7PVsI7sHFnWa5vqT5fHo+Vj0Ywph+cZxHF gP1/7Yw0etPpN6qSBo+wHwmychf8kdH3FaLLkk+PNdMTy3TaBUiiAx+PuWvh6Vxw//o4 XrSVQ2Naggh2dVBM9ioIOxVFVHYSpqNSpfIvm3sGyWvxwqi/ptYvn6t9DGqY4yqtysRr IxtHYMQ/L5Ej19PyoCKUZCPXXcrFF2RNwwQjCgFYfREnRjEgIFgzTl0U6R6n3o6Yz2nv 7zhRt6PuShW0H5uMxZ0Ine6sl49l2KKwSp/T4cScr5iHhFnRGtQ9YdE3Qvhvpt1FCpjN PuAg== |
X-Gm-Message-State: | AOPr4FX4z7+A6HC7KdHAwuUG5Jq6cSDWYk9SQx9RbalfUZ2pJPrgcGB6Dvra185Nq1fjs0Tekf28rgl/Ewresg== |
MIME-Version: | 1.0 |
X-Received: | by 10.28.55.139 with SMTP id e133mr6484685wma.98.1461717156621; Tue, 26 Apr 2016 17:32:36 -0700 (PDT) |
In-Reply-To: | <571FF46E.6050603@gmail.com> |
References: | <CAD8GWsuVECqpUX6_BDnKq+ueU8svKXqzG9BWHNOCj4P=e4aDyQ AT mail DOT gmail DOT com> <571FF46E DOT 6050603 AT gmail DOT com> |
Date: | Tue, 26 Apr 2016 20:32:36 -0400 |
Message-ID: | <CAD8GWsusQNP2g5=JbWuyu0L+YqZEOxkgh1TedZkKRxUV-VRZMQ@mail.gmail.com> |
Subject: | Re: converting from -mno-cygwin |
From: | Lee <ler762 AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
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. So I should uninstall it? I have both installed now: mingw64-i686-pthreads 20100619-5 OK mingw64-i686-winpthreads 4.0.6-1 OK and maybe it's a problem. I haven't tracked it down yet, but GNUmakefile.in has # PThreads library, if needed. PTHREAD_LIB = @PTHREAD_ONLY@@PTHREAD_LIB@ which, after running autoheader & autoconf, creates a GNUmakefile with # PThreads library, if needed. PTHREAD_LIB = -lpthreadGC2 which doesn't work :( >> If I should be using the pthread library, what's the correct library >> name to give GCC - ie. in the make file, >> PTHREAD_LIB = ??what?? >> >> > > Just use -lpthread like everyone on *nix does. OK - I just have to figure out how to get autoheader/autoconf to do that. >> Is there a way to get the libraries included as part of the >> executable? I'd rather not have to include libwinpthread-1.dll & >> zlib1.dll in the distribution package. >> >> > > -static? ymmv. Yes! that's the magic needed. $ make i686-w64-mingw32-gcc -mwindows -mwin32 -o privoxy.exe actions.o cgi.o cgiedit.o cgisimple.o deanimate.o encode.o errlog.o filters.o gateway.o jbsockets.o jcc.o list.o loadcfg.o loaders.o miscutil.o parsers.o ssplit.o urlmatch.o client-tags.o w32log.o w32taskbar.o win32.o w32svrapi.o w32.res pcrs.o pcre/get.o pcre/maketables.o pcre/study.o pcre/pcre.o pcre/pcreposix.o -lws2_32 -lz -static -lwsock32 -lcomctl32 -lpthread and I don't need the DLLs any more :) >> 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. 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 >> 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[] = 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. 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. Thanks, Lee -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |