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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=E996pp2lIlVcnZCG Z8M2KQWXOy8bCDscSzti2OHBlSQizR6xV6IraW/yqH6E+Eg3nughJoDMHlPb8C+X V8zDZ/gkyaG6ptD8Tb5VAsSLPOKK2g0dEJQEl5GwRVLSSIzfpprLtV/9Zk8remEa DEBaOYVNGs6lV/lvtR7oSPPSI3k= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=DvqSjnY5DU4b22I+W4Zgks dp55Q=; b=u+ps/3YJdNzqQQKMPR/ElQQP+FAlYyNCaK5VJridoO70e9rSW6hZuW pD+LWnz6RbAjVmolQdKrMdhY1AoLIZ9MOIjJHHoJMFcZFDjm8nC5btrmkLdivJUU 03YthrFFDIX4gtjZ/pzldlQh5nL8SdSh1nPYwnQZU0SqyUCuDPKtI= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.4 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=mixing, 02022017, Nilefalk, nilefalk X-HELO: mailout03.t-online.de Subject: Re: Providing cygwin1.dll in both 32- and 64-bit versions To: cygwin AT cygwin DOT com References: <5893A0CD DOT 5090107 AT junovagen DOT se> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: Date: Thu, 2 Feb 2017 23:10:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <5893A0CD.5090107@junovagen.se> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Am 02.02.2017 um 22:12 schrieb Thomas Nilefalk: > Using 'i686-pc-cygwin-gcc' creates an executable but that is un-runnable > in a Cygwin64 environment because the cygwin1.dll is a 64-bit version > and not compatible with the produced executable. A cygwin32 DLL needs to > be put first in the path to make the executable run. > > Is this by design? Pretty much, yes. Windows itself already has a seriously hard time mixing and matching 32-bit and 64-bit executables and their DLLs. The tricks MS uses to pull that off range from outright scary to Marx-Brothers-grade hilarious, depending how you look at them. As I see it, Cygwin rightfully opted for sanity here by keeping the two worlds separate. > At least it seems to me that 'gcc -m32' could be > taken to mean 'create an executable in the current ABI-environment > (cygwin64) which uses a 32-bit architecture'. No, it really can't. -m32 does what the GCC documentation says: it makes GCC generate 32-bit x86 code. Nothing in there so much as suggests that such code will actually work in a given ABI environment. In the case of Cygwin64 it won't. > 'how can I make a 32-bit compiled cygwin program run under cygwin64'? You can't. Nor can anybody else. For a Cygwin64-based program, Cygwin32 is a bona fide cross-compilation platform rather than just some subset of the same platform. The same holds vice versa. -- 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