RE: [Flightgear-devel] MinGW/cross-compiler writeup

2004-04-30 Thread Norman Vine
Andy Ross writes:
> 
> Norman Vine wrote:
> > Andy Ross wrote:
> > > You *can* do this with cygwin [...]  The compiler supports a
> > > -mno-cygwin flag
> > >
> > > Unfortunately it turns out that cygwin doesn't install these tools
> > > under the conventional "platform-program" names (e.g. mingw32-gcc)
> >
> > To invoke the the MingW version of the Cygwin compiler use gcc
> > -mno-cygwin
> 
> Yes, but the question was how to specify that option to an
> autoconf-generated configure script to get it to use that option.
> Cygwin doesn't follow the standard convention here.

the problem probably is that there is no way for autoconfig to
determine whether you want to compile for MingW or Cygwin
because both systems are running on Windows ;-)

Note that MSYS has a modified uname command so this is
not a problem when using the MSYS version of gcc on Windows.

But IMHO this is just want of those cases where you are better off
explicitly telling the compiler what you want.

i.e. 
CC='gcc -mno-cygwin' CXX='c++ -mno-cygwin' ./configure --build=mingw32  --host=mingw32

Cheers

Norman



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] MinGW/cross-compiler writeup

2004-04-30 Thread David Luff
Andy Ross writes:

> Norman Vine wrote:
> > Andy Ross wrote:
> > > You *can* do this with cygwin [...]  The compiler supports a
> > > -mno-cygwin flag
> > >
> > > Unfortunately it turns out that cygwin doesn't install these tools
> > > under the conventional "platform-program" names (e.g. mingw32-gcc)
> >
> > To invoke the the MingW version of the Cygwin compiler use gcc
> > -mno-cygwin
> 
> Yes, but the question was how to specify that option to an
> autoconf-generated configure script to get it to use that option.
> Cygwin doesn't follow the standard convention here.
> 
>

CFLAGS="-Wall -O2 -mno-cygwin" CXXFLAGS="-Wall -O2 -mno-cygwin" ./configure?

Cheers - Dave

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] MinGW/cross-compiler writeup

2004-04-30 Thread Andy Ross
Norman Vine wrote:
> Andy Ross wrote:
> > You *can* do this with cygwin [...]  The compiler supports a
> > -mno-cygwin flag
> >
> > Unfortunately it turns out that cygwin doesn't install these tools
> > under the conventional "platform-program" names (e.g. mingw32-gcc)
>
> To invoke the the MingW version of the Cygwin compiler use gcc
> -mno-cygwin

Yes, but the question was how to specify that option to an
autoconf-generated configure script to get it to use that option.
Cygwin doesn't follow the standard convention here.

Andy

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] MinGW/cross-compiler writeup

2004-04-30 Thread Norman Vine
Andy Ross writes:
> 
> Gunnstein Lye wrote:
> > Thanks for the info. Do you really have to build separate binaries
> > of gcc for each target? I thought I could use the same binary for
> > linux (native) and windows (crosscompiling).
> 
> Not to my knowledge.  The code generation is more or less identical,
> but some of the symbol naming rules are different, the decisions as to
> which sections to place symbols into is different, and of course the
> binutils formats are entirely different.
> 
> You *can* do this with cygwin, where the only difference from MinGW is
> the C runtime library.  The compiler supports a -mno-cygwin flag that
> basically turns it into the same toolchain you get with a
> --target=mingw32 build.
> 
> Unfortunately it turns out that cygwin doesn't install these tools
> under the conventional "platform-program" names (e.g. mingw32-gcc), so
> I'm not sure how cygwin users are supposed to use them with a autoconf
> environment which requires those names for cross compiling.  For right
> now, cygwin users are going to have to install or build the mingw
> stuff even though it's redundant.

To invoke the the MingW version of the Cygwin compiler
use gcc -mno-cygwin

You might find it interesting to take a peek into

/lib/gcc-lib  in your Cygwin tree 

Cheers

Norman

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] MinGW/cross-compiler writeup

2004-04-30 Thread Andy Ross
Gunnstein Lye wrote:
> Thanks for the info. Do you really have to build separate binaries
> of gcc for each target? I thought I could use the same binary for
> linux (native) and windows (crosscompiling).

Not to my knowledge.  The code generation is more or less identical,
but some of the symbol naming rules are different, the decisions as to
which sections to place symbols into is different, and of course the
binutils formats are entirely different.

You *can* do this with cygwin, where the only difference from MinGW is
the C runtime library.  The compiler supports a -mno-cygwin flag that
basically turns it into the same toolchain you get with a
--target=mingw32 build.

Unfortunately it turns out that cygwin doesn't install these tools
under the conventional "platform-program" names (e.g. mingw32-gcc), so
I'm not sure how cygwin users are supposed to use them with a autoconf
environment which requires those names for cross compiling.  For right
now, cygwin users are going to have to install or build the mingw
stuff even though it's redundant.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] MinGW/cross-compiler writeup

2004-04-30 Thread Gunnstein Lye
On Friday 30 April 2004 02:57, Andy Ross wrote:
> OK, I think I've got the kinks worked out of the MinGW work, and
> have written up a little README (attached) describing how the
> process works.  Thanks to Norman and Frederic for the pointer to
> the pthread library.

Thanks for the info. Do you really have to build separate binaries of gcc for 
each target? I thought I could use the same binary for linux (native) and 
windows (crosscompiling).

-- 
best regards,
Gunnstein Lye
Systems engineer
[EMAIL PROTECTED] | eZ systems | ez.no


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel