From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20049 invoked by alias); 13 Jan 2015 09:17:15 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20036 invoked by uid 89); 13 Jan 2015 09:17:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 13 Jan 2015 09:17:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 4983B1162D5; Tue, 13 Jan 2015 04:17:11 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z2OoXbH69gDg; Tue, 13 Jan 2015 04:17:11 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C3C0B1162D2; Tue, 13 Jan 2015 04:17:10 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 2898948E89; Tue, 13 Jan 2015 13:17:06 +0400 (RET) Date: Tue, 13 Jan 2015 09:17:00 -0000 From: Joel Brobecker To: Zach Welch Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix gdbserver build with x86_64-w64-mingw32 -m32 Message-ID: <20150113091706.GB8167@adacore.com> References: <1420825778-8946-1-git-send-email-zwelch@codesourcery.com> <20150110041728.GQ5445@adacore.com> <54B40A39.5000106@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B40A39.5000106@codesourcery.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2015-01/txt/msg00324.txt.bz2 > > Intuitively, I would say that the proper way to achive a 32bit > > gdbserver is by configuring it using a 32bit triplet, no? > > What happens if you do: > > > > ./configure --build=i686-pc-mingw32 CFLAGS='-m32' > > Actually, I am using i686-pc-linux-gnu as $build. I think you meant to > ask for --host. I am using --host=x86_64-w64-mingw32 CFLAGS=-m32, which > is distinctly different than i686-pc-mingw32. For example, they use > completely different runtime libraries. I think it would be an error to > conflate the two toolchains. Thus, I stand by my patch as the correct > solution for this issue. Actually, I did mean --build=. This option is meant to override what the config.guess script would normally guess as being your operating system. On Windows, at least in my case, config.guess guesses i686-pc-mingw32, which is not what you want, because it's cygwin. That's why you need --build=i686-pc-mingw32. Unless I misunderstood you, I suspect you're gettting confused by the meaning of the --host, --build and --target. BTW, if you configure with just --host, you should get the following warning at the very beginning. configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. -- Joel