delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/13/14:02:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: smtp3.cern.ch: Host pb-d-128-141-36-121.cern.ch [128.141.36.121] claimed to be lxcms60.cern.ch
Message-ID: <3E70D5C7.70300@cern.ch>
Date: Thu, 13 Mar 2003 20:02:31 +0100
From: "Lassi A. Tuura" <lassi DOT tuura AT cern DOT ch>
Organization: Northeastern University, Boston, USA
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20030129
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: GCC 3.2.2 linux to cygwin,mingw32 cross compiler?

Hi,

Is there a receipe for building a linux-hosted cygwin/mingw32 GCC 3.2.2
(or any 3.2+) cross compiler for C and C++?  For linux-x-mingw32 I did
<http://jrfonseca.dyndns.org/projects/gnu-win32/documentation/cross>
and for linux-x-cygwin <http://www.wxwindows.org/technote/crosscmp.htm>.

Building GCC 3.2.2 linux-x-cygwin took a few tweaks in libiberty and
choosing the right top-level include contents, but otherwise it went
fine.  I can post the exact receipe in case it matters.

I noticed that with -mno-cygwin it prefers i686-pc-cygwin/include over
i686-pc-cygwin/include/mingw (e.g. io.h, but there are others, and it
finds unistd.h etc.).  I got around some of those by changing specs in
gcc/config/i386/cygwin.h to -isystem instead of -idirafter the mingw
include dir.  (BTW, it didn't find crt.o with the -L option either, I
added the full path in the specs file.)

With those changes C++ is not happy however.  libstdc++ assumes cygwin's
newlib ctype.h but gets mingw/ctype.h, with lots of messages of type:
  .../include/c++/3.2.2/i686-pc-cygwin/bits/ctype_base.h:46:
     `_U' was not declared in this scope

Is this currently known to be broken or did I screw it up with the above
changes to specs?  Is there an easy fix?  Would this require multilib
magic for libstdc++ for -mno-cygwin?

In short, is it possible to have one cross chain to compile both cygwin
and mingw32 programs (latter with -mno-cygwin), or should I keep the two
separate chains?  I realise -mno-cygwin is a cygwin cross environment
already.  If someone says this "cross of a cross" won't work, that's ok
with me, I just want to know I am not responsible for cockpit errors :-)

//lat
-- 
Ambition, n.: An overmastering desire to be vilified by
enemies while living and ridiculed by friends when dead.
	--Ambrose Bierce


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019