From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25283 invoked by alias); 10 Jan 2002 21:09:00 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Received: (qmail 25244 invoked from network); 10 Jan 2002 21:08:56 -0000 Received: from unknown (HELO illustrious.cnchost.com) (207.155.252.7) by sources.redhat.com with SMTP; 10 Jan 2002 21:08:56 -0000 Received: from piano (adsl-66-120-57-93.dsl.lsan03.pacbell.net [66.120.57.93]) by illustrious.cnchost.com id QAA08028; Thu, 10 Jan 2002 16:08:55 -0500 (EST) [ConcentricHost SMTP Relay 1.14] Errors-To: From: "Jon Leichter" To: Cc: , Subject: RE: Compiling apps to Mingw32 with cygwin Date: Thu, 10 Jan 2002 13:09:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 In-Reply-To: <17B78BDF120BD411B70100500422FC6309E41A@IIS000> Importance: Normal X-SW-Source: 2002-01/txt/msg00670.txt.bz2 Earnie Boyd wrote: > Your wrapper script is a good idea but has the wrong name as has been > pointed out already. It needs to be named i386-pc-mingw32-gcc and a > copy as mingw32-gcc so that when specifying the --host=mingw32 or > --host=i386-pc-mingw32 the configure script will find it appropriately. > Of course to do this you also need to do the same for the binutils > binaries. > > Yes, specifying --host without the other parts of the triplet indicates > a cross build to configure. You are even warned of this fact. Specify > all three to avoid configure from figuring it out on it's own. You've > just been lucky enough to not configure a package that cares. Try > configuring binutils if you want to see what happens with just > specifying host. J. Henning Schwentner wrote: > Dear Earnie, > > I do not get it with the --build switch. Am I not building on > i686-pc-cygwin? Is it i368-pc-mingw because I use the mingw-headers? > But I use the cygwin-compiler. > > Sorry, but I am confused a bit ... Earnie, I'm confused too. The symlink approach (i.e. i386-pc-mingw32-gcc) might be appropriate for latter versions of autoconf, but it does not work for earlier versions. I contribute to the OpenLDAP project, specifically its MinGW support. To build MinGW OpenLDAP, I've also got to build regex-0.12, gdbm-1.8.0, and libtool-1.4.2. As far as I can tell, none of the configure scripts in these projects conform to the notion of looking for ${host}-gcc or any other ${host}-tool. In these projects, the solution I pointed out works flawlessly: CC=mgcc ./configure --host=i686-pc-mingw32 The configure script in regex-0.12 does not even accept the --host switch (or --target or --build). Instead, it treats the last parameter on the command line as the "host": CC=mgcc ./configure i686-pc-mingw32 The configure script in regex-0.12 does not make any real use of this value, so it doesn't really have any effect on the build. I originally responded to J. Henning Schwentner, who started this thread. At this point, I don't remember what he said he was building. However, it's obvious to me that unless you're building a project with a configure script built by an up-to-date version of autoconf, none of what you have suggested will work. Note that the approach I suggested will work in either case, WITH THE POSSIBLE EXCEPTION (as you have stated) that one runs into trouble if --build and --target are not specified as well. This spawns another associated topic. What are the right values for the triplets (in CURRENT autoconf)? If you're building MinGW binaries in a Cygwin-hosted environment, it seems to me that you should ONLY specify --target=i686-pc-mingw32 and let the other two switches resolve themselves to i686-pc-cygwin. When I build MinGW binaries with Cygwin tools, I am not using a MinGW-hosted environment or MinGW tools. All of binutils, for example, are still Cygwin tools, and they DON'T honor the -mno-cygwin switch. I don't want to symlink those tools either. None of this should matter as long as GCC produces MinGW binaries. Why should it matter if configure believes that you're doing a cross-compile. In a loose sense, you are. This, of course, is a religious argument. Note that I have tried to only use the --target switch in my projects, opposed to the --host switch. However, in OpenLDAP and the other related projects, NONE of the configure scripts handle these switches correctly. I found that using --host was the best solution for these projects. Indeed, until the latest version of autoconf makes its way into all projects as a standard, these switches will need to be examined by the project builder in order to have context on how to build. Jon -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/