This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Readymade binary rpm for CrossGCC


Shriramana Sharma wrote:

> > BTW what system do you need to target?
> 
> Um, is ix86 a correct answer?

That's still pretty vague.  When building a toolchain you need to know
the "host triplet" which includes CPU type, architecture, operating
system, and sometimes other details like ABI or C library.  For 32 bit
linux on x86 this is normally something like "i686-unknown-linux-gnu" or
"x86_64-unknown-linux-gnu" for 64 bit.  For mingw I've seen just
"mingw32" but also "i686-pc-mingw32" or sometimes "i686-pc-mingw32msvc".

> > If it's a linux glibc system, have you tried using crosstool to build
> > your cross-compiler?
> 
> Well I mainly use SUSE Linux 10.0 but want to compile binaries for 32-bit
> Windows *without booting to Windows to use MinGW*.

That clears it up mostly.  You won't be able to use crosstool for this
since it is for linux+glibc targets.  You will probably have to do this
by hand.  Debian has prepackaged crosss-mingw binaries, btw.

The rough outline of the plan would be:

Download and unpack the mingw packages mingw-runtime and w32api into a
chosen $prefix.  Download binutils source, configure with
--target=i686-pc-mingw32 (or whatever you want to call it) and --prefix
set appropriately, build, install to $prefix.  Add $prefix/bin to PATH. 
Download gcc source, configure similaraly and build.  Now you can
cross-compile your actual programs by simply configuring with
--host=i686-pc-mingw32 and it should find all the appropriate cross
tools if you've added the $prefix/bin to the PATH.

Note that mingw uses some local gcc patches so you'd be better to use
their source packages instead of vanilla FSF source.

You can see an example of this procedure for Cygwin here
<http://x.cygwin.com/docs/cg/prog-build-cross.html>.  This is similar to
what you'd do for mingw, but not exactly the same.

Brian

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]