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 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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/