From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85531 invoked by alias); 2 Feb 2017 21:13:04 -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 85458 invoked by uid 89); 2 Feb 2017 21:13:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=HX-HELO:sk:mailrel, HX-Envelope-From:sk:thomas@, H*F:D*se, H*c:ISO-8859-1 X-HELO: mailrelay3.public.one.com Received: from mailrelay3.public.one.com (HELO mailrelay3.public.one.com) (195.47.247.221) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Feb 2017 21:12:53 +0000 X-HalOne-Cookie: 3784f513781ae19c76c303ad0b37f857d14a6715 X-HalOne-ID: 59e575f0-e98c-11e6-9cd7-b8ca3afa9d73 Received: from [192.168.12.101] (unknown [81.225.92.36]) by smtpfilter1.public.one.com (Halon) with ESMTPSA id 59e575f0-e98c-11e6-9cd7-b8ca3afa9d73; Thu, 02 Feb 2017 21:12:49 +0000 (UTC) Message-ID: <5893A0CD.5090107@junovagen.se> Date: Thu, 02 Feb 2017 21:13:00 -0000 From: Thomas Nilefalk User-Agent: Postbox 5.0.10 (Windows/20170123) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Providing cygwin1.dll in both 32- and 64-bit versions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00025.txt.bz2 I'm cross-compiling on Cygwin64 to 32-bit. Or rather I'm trying to figure out what compiling to 32-bits on a Cygwin64 actually means. Using 'gcc -m32' causes a lot of "skipping incompatible ..." for a lot of libraries, so obviously ld then looks for the 32-bit libraries in the "wrong" place. 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? 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'. I'm not sure that makes sense or is even possible, but if it is not, then the question becomes 'how can I make a 32-bit compiled cygwin program run under cygwin64'? One way to answer that is to say "export PATH=:$PATH" but that requires installing cygwin32. I understand that could be the semantics of "cross-compilation" (you could compile for any platform, and can't expect that to run in your host environment), but then I'd like to propose that "-m32" should/could mean compile for host using 32-bit restrictions. Which part of this is true? Is there a bug with "-m32" or am I just misunderstanding everything? /Thomas -- 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