This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix gdbserver build with x86_64-w64-mingw32 -m32
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Zach Welch <zwelch at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 15 Jan 2015 08:46:05 +0400
- Subject: Re: [PATCH] Fix gdbserver build with x86_64-w64-mingw32 -m32
- Authentication-results: sourceware.org; auth=none
- References: <1420825778-8946-1-git-send-email-zwelch at codesourcery dot com> <20150110041728 dot GQ5445 at adacore dot com> <54B40A39 dot 5000106 at codesourcery dot com> <20150113091706 dot GB8167 at adacore dot com> <54B54EF2 dot 3050901 at codesourcery dot com>
> Thus, the primary host for which I am building gdbserver is
> x86_64-w64-mingw32 (--host=x86_64-w64-mingw32), but I am also using the
> x86_64-w64-mingw32 toolchain to build a multilib for 32-bit windows
> (--host=x86_64-w64-mingw32 CFLAGS="-m32") as a secondary host. gdbserver
> runs on the target (and is not itself a cross compiler), so --host ==
> --target in both cases.
>
> The primary host gdbserver build (--host=x86_64-w64-mingw32) works, but
> the secondary host build (--host=x86_64-w64-mingw32 CFLAGS="-m32") fails
> without my provided patch.
OK, IIUC, I think you want to use a 32bit mingw32 --host triplet
in this case. The fact that the OS you'll be running gdbserver on
is 64bit does matter, your gdbserver still going to be a 32bit executable,
and therefore should be configured as such.
--
Joel