gcc compilation problem

Brian Dessent brian@dessent.net
Fri Sep 2 20:38:00 GMT 2005

Natasha Shevchenko wrote:

> I'm trying to compile a domestic embedded application using cygwin 3.4.4,
> powerpc, OSE 4.4.1 on Windows XP (the application compiles completely normal
> on Win NT and 2000 with cygwin 2.95.2, powerpc and OSE 4.4.1, I tried this
> set, but got "signal 11" or segmentation failure). During this process I
> have numerous problems. Lust one of which is following:

I think you're somewhat confused.  There is no such thing as "cygwin
3.4.4".  There is gcc version 3.4.4, and the Cygwin project provides a
port of this version, which is what you appear to be using.  But this is
just one of many packages that the Cygwin project provides.  When you
talk about "the version of Cygwin" you're referring to the version of
the posix compatibility layer that Cygwin provides (cygwin1.dll) which
is currently at version 1.5.18.

The gcc and binutils included with the Cygwin distribution are native. 
They only produces binares for PCs with x86 processors running Microsoft
windows with Cygwin installed.  They cannot be used for anything else,
and have no idea about powerpc instructions.

However, since Cygwin provides this posix compatibility layer it is
common to build cross compilers in the Cygwin environment because it
approximates a *nix machine for which the compilers were designed to be
hosted on.  This is normally done by downloading the source for gcc and
binutils (and some kind of libc), and configuring them as cross
compilers and then building them.  This is the topic of this mailing

So, if you have downloaded Cygwin from cygwin.com expecting to be able
to do anything but build native binaries that run under Windows, then it
will not work.  You need to build a cross compiler yourself, or you need
to download prebuilt binaries from some location such as a tool vendor
(but not cygwin.com or any of its mirrors, because that is not the focus
of the project.)

If you do actually have a cross compiler installed, then you need to set
$CC correctly (or your --host= configure parameters) because you are
still invoking the Cygwin-packaged native gcc.


Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

More information about the crossgcc mailing list