X-Recipient: archive-cygwin@delorie.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:references:message-id:date:from:reply-to
	:subject:to:cc:in-reply-to:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=dPJ3Q/gvvxtkwD6m
	XG1LMDaLjEFGlENivawd0TyOrOYXyKIgkd/dnycx7Y+5ycvk3+kS+gbN93e0dH9k
	4qiD3MczB9yQdJOwnVNgrmIs83wUQedYp/TLTFKcPlHH2x15C8oqn6ChiwRdtkfw
	izM65YtkaFHSeoFyyDTAy76ZRmM=
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:references:message-id:date:from:reply-to
	:subject:to:cc:in-reply-to:mime-version:content-type
	:content-transfer-encoding; s=default; bh=PlEyOf6BoBnVuBsakYdHRr
	kR+g8=; b=UuYaJEcsdqr6FBHKhZna3nirGv5AVQFyFP1eAYe8lTBm/S/7+iAsqt
	vuHq1D+JZveG8TLZII30+BoAhgdWmEYLj+a1zkuR15283/bNEvOVIEX/tfMD3k7y
	NqPQ8FYAPerKlwOPQkwdwW2HXFQaXztVb3DQZU648e+rVKBIXg5gw=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.2 required=5.0 tests=AWL,BAYES_00,FOREIGN_SUBJECT,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: nm20-vm2.access.bullet.mail.bf1.yahoo.com
References: <bug-58799-23798@http.gcc.gnu.org/bugzilla/> <bug-58799-23798-jpgPVpVU2B@http.gcc.gnu.org/bugzilla/> <1382135640.94420.YahooMailNeo@web181306.mail.ne1.yahoo.com> <1382135893.8524.YahooMailNeo@web181304.mail.ne1.yahoo.com>
Message-ID: <1382210427.30799.YahooMailNeo@web181305.mail.ne1.yahoo.com>
Date: Sat, 19 Oct 2013 12:20:27 -0700 (PDT)
From: Arthur Schwarz <aschwarz1309@att.net>
Reply-To: Arthur Schwarz <aschwarz1309@att.net>
Subject: Re: g++ -m32 option causes an error
To: cygwin@cygwin.com
Cc: Warren Young <warren@etr-usa.com>
In-Reply-To: <1382135893.8524.YahooMailNeo@web181304.mail.ne1.yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r9JJKhsq025375


What I am trying to do is to cross-compile to a 32-bit system and get 4-byte longs, 8-byte doubles and 4-byte pointers instead of 8-byte longs, 16-byte doubles and pointers. I have 11 compilers downloaded as part of the standard download from cygwin, with some being duplicates. Some of the compiler names seemed to be cross-compiled to a 32-bit CPU, and in checking this out this guess turns out to be untrue. What I want is the compiler to generate 32-bit code loadable on a 64-bit and a 32-bit platform. This is possible using the 32-bit cygwin compilers.
 
 I am using Netbeans as my development IDE. The compilers used and the results of compilation are given below.
 
 I don't understand why there is not x86_64-pc-cygwin assembler and I don't understand why the builds link to the wrong libraries. I'm going to cross-mail this letter to Netbeans to see if they can give some help.
 
 Sorry about the delay, I've trying to find out what is going on.
 
 art
 
compile command g++ -w   -c -g -MMD -MP -MF 
link command    g++ -o 


gcc.exe                          4.8.1      64-bits
i686-pc-cygwin-gcc.exe           4.8.1      linking w/x86_64-pc-cygwin/4.8.1
i686-pc-cygwin-gcc-4.7.3.exe     4.7.3      linking w/x86_64-pc-cygwin/4.8.1
x86_64-pc-cygwin-gcc.exe         4.8.1      64-bits
x86_64-pc-cygwin-gcc-4.8.1.exe   4.8.1      64-bits

i686-pc-mingw32-gcc.exe          4.7.3      linking w/x86_64-pc-cygwin/4.8.1
i686-pc-mingw32-gcc-4.7.3.exe    4.7.3      linking w/x86_64-pc-cygwin/4.8.1
i686-w64-mingw32-gcc.exe         4.8.1      linking w/x86_64-pc-cygwin/4.8.1
i686-w64-mingw32-gcc-4.8.1.exe   4.8.1      linking w/x86_64-pc-cygwin/4.8.1
x86_64-w64-mingw32-gcc.exe       4.8.1      compiler incompatibilities
x86_64-w64-mingw32-gcc-4.8.1.exe 4.8.1      compiler incompatibilities

Some compiler statistics.
compiler command -v | tr ' ' '\n' | egrep 'build|target|host'

gcc.exe                          build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=x86_64-pc-cygwin
i686-pc-cygwin-gcc.exe           build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=i686-pc-cygwin
i686-pc-cygwin-gcc-4.7.3.exe     build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=i686-pc-cygwin
x86_64-pc-cygwin-gcc.exe         build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=x86_64-pc-cygwin
x86_64-pc-cygwin-gcc-4.8.1.exe   build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=x86_64-pc-cygwin
i686-pc-mingw32-gcc.exe          build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=i686-pc-mingw32
i686-pc-mingw32-gcc-4.7.3.exe    build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=i686-pc-mingw32
i686-w64-mingw32-gcc.exe         build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=i686-w64-mingw32
i686-w64-mingw32-gcc-4.8.1.exe   build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=i686-w64-mingw32
x86_64-w64-mingw32-gcc.exe       build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=x86_64-w64-mingw32
x86_64-w64-mingw32-gcc-4.8.1.exe build=x86_64-pc-cygwin host=x86_64-pc-cygwin target=x86_64-w64-mingw32 

as.exe
i686-pc-cygwin-as.exe
i686-pc-mingw32-as.exe
i686-w64-mingw32-as.exe
x86_64-w64-mingw32-as.exe

 
----- Original Message -----

On 10/18/2013 16:38, Arthur Schwarz wrote:


    No error occurs during compilation with i686-pc-mingw32-g++ (GCC) 4.7.3.


Why are you using both -m32 *and* a cross-compiler? If you're running 64-bit Cygwin and need to make a 32-bit Cygwin program, use the cross-compiler. Passing -m32 to the 32-bit Cygwin compiler shouldn't be necessary.


I wouldn't expect -m32 to work for Cygwin since it's not like other 64-bit *ixes where 32-bit programs are expected to work side-by-side with 64-bit ones. So, while any problem in -m32 handling could doubtless be fixed, there isn't a whole lot of incentive to do it. Cross-compiling fits the two-se

--
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


