delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/03/11:18:03

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <472C9F25.433A3C56@dessent.net>
Date: Sat, 03 Nov 2007 09:17:41 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: GCC 4.2.2 with -mno-cygwin
References: <fcb24b50711030859sf149a4fpb54b1a7253bd38b AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

n DOT torrey DOT pines AT gmail DOT com wrote:

> I compiled and installed GCC 4.2.2 in /usr/local seemingly
> successfully. However, using -mno-cygwin, I get an error:
> 
> $ gcc -mno-cygwin hello_world.c
> gcc: error trying to exec 'cc1': execvp: No such file or directory
> 
> Indeed, /usr/local/lib/gcc/i686-pc-mingw32 is missing altogether, and
> /usr/local/lib/gcc/i686-pc-cygwin/4.2.2/ does not contain cc1.
> 
> Should I have taken some special steps during the configuration to
> enable -mno-cygwin? I couldn't find any information about this.

Yes, you need to do a fair amount of extra work in order to get
-mno-cygwin to work.

- You'll need the various target libraries (libgcc, libstdc++,
libsupc++, libgfortran, libgomp, libada, libgcj, etc.) of the same
version of gcc (and same configure options) built for MinGW and put in
the $libexecdir/gcc/$target/$version (assuming you used
--enable-version-specific-runtime-libraries, otherwise without
$version.)

- You'll need symlinks for $tooldir/include, $tooldir/lib, and
$tooldir/bin (where $tooldir defaults to $prefix/$target) as well as for
the compiler subexecutables in $libexecdir/gcc/$target/$version pointing
to the Cygwin ones.

The best way to go is look at the packaged version of gcc and see how
it's done.

All in all I think it would be a lot simpler just to build a straight
MinGW cross compiler.  Then you'd just use "i686-pc-mingw32-gcc" instead
of "gcc -mno-cygwin".  And in fact this is the eventual plan as this
-mno-cygwin "fake/pseudo cross-compiler" thing is really the wrong way.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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