From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16207 invoked by alias); 30 Aug 2006 09:16:19 -0000 Received: (qmail 16187 invoked by uid 22791); 30 Aug 2006 09:16:19 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.clear.net.nz (HELO smtp1.clear.net.nz) (203.97.33.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Aug 2006 09:16:14 +0000 Received: from anykey (218-101-109-173.dialup.clear.net.nz [218.101.109.173]) by smtp1.clear.net.nz (CLEAR Net Mail) with ESMTP id <0J4T00AW60EGB5@smtp1.clear.net.nz>; Wed, 30 Aug 2006 21:15:54 +1200 (NZST) Date: Wed, 30 Aug 2006 20:32:00 -0000 From: Danny Smith Subject: RE: [RFC] Simplify MinGW canadian crosses To: GCC-patches , Binutils , gdb-patches@sourceware.org Message-id: <002701c6cc14$ee7f4c10$ad6d65da@anykey> MIME-version: 1.0 X-Mailer: Microsoft Outlook, Build 10.0.2627 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00226.txt.bz2 >[RFC] Simplify MinGW canadian crosses > From: Corinna Vinschen > 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 > > ------------------------------------------------------------------------ -------- > > Hi, > > > I created the below patchset to allow to build canadian crosses with > MinGW as host machine. It allowed me to build a linux-x-mingw-x-powerpc > canadian cross, using the in-tree winsup directory, and so, > consequentially, without the need to have any externally installed MinGW > 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 for > MinGW. > > - 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 directory > to build MinGW. I changed this so that the existence of winsup/cygwin > is tested instead. > > - If MinGW is the target, the appropriate winsup/mingw and winsup/w32api > 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 > target. > > - 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 top-level, > 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 to > be configurable, and is configured depending on the target in > winsup/configure.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. Danny