From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3836 invoked by alias); 1 Mar 2013 20:01:35 -0000 Received: (qmail 3823 invoked by uid 22791); 1 Mar 2013 20:01:34 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from imr-mb02.mx.aol.com (HELO imr-mb02.mx.aol.com) (64.12.207.163) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Mar 2013 20:01:31 +0000 Received: from mtaout-mb05.r1000.mx.aol.com (mtaout-mb05.r1000.mx.aol.com [172.29.41.69]) by imr-mb02.mx.aol.com (Outbound Mail Relay) with ESMTP id 5C5A138000234 for ; Fri, 1 Mar 2013 15:01:30 -0500 (EST) Received: from [192.168.0.11] (cpe-69-133-204-177.cinci.res.rr.com [69.133.204.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mtaout-mb05.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id 119A3E000141 for ; Fri, 1 Mar 2013 15:01:30 -0500 (EST) Message-ID: <51310918.50408@aol.com> Date: Fri, 01 Mar 2013 20:01:00 -0000 From: Tim Prince Reply-To: tprince@computer.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: cross compiling gcc for i686 target References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:402697888:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d2945513109192c82 X-AOL-IP: 69.133.204.177 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg00007.txt.bz2 On 03/01/2013 01:28 PM, Ian Lance Taylor wrote: > On Fri, Mar 1, 2013 at 9:39 AM, vijay nag wrote: >> Is it possible to do a cross compile of gcc-4.7.2 on AMD x86_64 to >> produce i686 target ? >> >> My build, host and target parameters are amd64-pc-linux-gnu, >> amd64-pc-linux-gnu and i686-pc-linux-gnu. My native compiler again is >> a 64 bit compiler emitting default 64 bit object code. > Yes, it is possible. > > It is also usually unnecessary. A typical x86_64 compiler > installation will produce 32-bit x86 code with the -m32 option. > > Ian That switches you over to a 32-bit compiler, taking advantage of the support of 32-bit execution under this OS. In many current x86_64 installations, the 32-bit compiler is an additional option requiring the primary gcc development system option. -- Tim Prince