This is the mail archive of the
mailing list for the binutils project.
RE: [RFC] Simplify MinGW canadian crosses
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC-patches <gcc-patches at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>, gdb-patches at sourceware dot org
- Date: Wed, 30 Aug 2006 21:16:08 +1200
- Subject: RE: [RFC] Simplify MinGW canadian crosses
>[RFC] Simplify MinGW canadian crosses
> From: Corinna Vinschen <vinschen at redhat dot com>
> To: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot
org, binutils at sourceware dot org, mingw-patches at lists dot
sourceforge dot net, cygwin-patches at cygwin dot com
> Date: Tue, 29 Aug 2006 13:41:07 +0200
> Subject: [RFC] Simplify MinGW canadian crosses
> I created the below patchset to allow to build canadian crosses with
> MinGW as host machine. It allowed me to build a
> canadian cross, using the in-tree winsup directory, and so,
> consequentially, without the need to have any externally installed
> headers and/or libraries.
> Unfortunately, this requires changes in top-level, in libiberty, in
> winsup, in winsup/mingw, and in winsup/w32api.
> A few details:
> - The top-level configury mistakenly treated MinGW as a newlib sort of
> host/target. My patch drops newlib from the directories to build
> - The top-level configury tests for the winsup directory to figure out
> whether newlib for Cygwin can be built. This test is questionable,
> since the winsup dir could only contain a mingw and a w32api
> to build MinGW. I changed this so that the existence of
> is tested instead.
> - If MinGW is the target, the appropriate winsup/mingw and
> directories are added to FLAGS_FOR_TARGET so that the canadian build
> works with mingw and w32api in-tree, same way as if it's a cygwin
> - The libiberty configury doesn't work for mingw correctly. If it
> works, it only works accidentally because MinGW has been build with
> --with-newlib. Since that's wrong and has been changed in
> MinGW must be handled explicitely now.
> - In the winsup configury, I decoupled MinGW from Cygwin, so that it's
> possible to build one without relying on the other. The only
> directory necessary for both of them is w32api.
> - A major problem when building canadian crosses are tests which check
> for the compiler being able to create executables (AC_PROG_CC) and
> tests for availability of functions. To workaround this problem, I
> added GCC_NO_EXECUTABLES to winsup/acinclude.m4 and rebuilt the
> subsequent aclocal.m4 files (but I left out the aclocal.m4 files in
> the below patch set).
> - The winsup Makefile fails to install if the CYGWIN_LICENSE file is
> missing. This doesn't make sense for MinGW, so I have changed this
> be configurable, and is configured depending on the target in
> - Everything else are minor changes to install files into the right
> spot, etc.
> Are the changes ok with everybody?
With removal of GCC_NO_EXECUTABLES duplication from winsup/acinclude.m4
(that Corinna has already mentioned) these changes are fine by me. In
fact, they fix a cross-compilation issue that is currently being
discussed on mingw list.
Thanks for doing this, Corinna.