Web lists-archives.org

Re: [Mingw-users] Ready to build g77 for Vista




Sisyphus wrote:
> Anyway ... back to the task at hand .... I now have a working 
> cross-compiler, but I'm unclear on what to do next.
>
> I expect it involves gcc-3.4.5-build.sh and the various source packages, but 
> I'm unclear on precisely what to do with those various files.
>   
That should be just about what you need. If you don't already have the 
GCC 3.4.5 sources unpacked (core required, other languages as desired), 
unpack them. Then you'll need to make a few additions to gcc-3.4.5-build.sh.

First, you need to make sure the host specification in the configure 
command matches the cross compiler's target-spec exactly; otherwise 
it'll go looking for compiler executables that don't exist. So if you 
went with i386-mingw32, make sure to change "--host=mingw32" to 
"--host=i386-mingw32" (conversely, if you went with just "mingw32" then 
you won't have to change anything).

Second, you need to make sure the cross-compiler binaries can actually 
be found -- this is easiest accomplished by adding the bin directory to 
$PATH:

PATH=$CROSS_GCC/bin:$PATH

export PATH

where $CROSS_GCC is your cross compiler's $INSTALL_DIR.

Next, add a --build specification to the configure command to reflect 
the fact that you're building on a different system from the host and 
target. It's generally easiest to set this with config.guess:

--build=`$GCC_SRC/config.guess`

($GCC_SRC being the directory of the GCC 3.4.5 sources, of course.) For 
me on Ubuntu 7.10, config.guess correctly returns i686-pc-linux-gnu.

Finally, you can't bootstrap your crossed-native build since the 
cross-compiled binaries can't run on Linux, so add --disable-bootstrap 
to the configure command and get rid of the "bootstrap" in the make command.

A couple more notes -- you may need to change "--enable-threads" to 
"--enable-threads=win32". I know the longer version works; I'm not sure 
whether the shorter (autodect) version works for a crossed-native build 
or not, as I've never tried it. Also, you should leave out "ada" and 
"java" from --enable-languages unless you really need them. (Ada because 
you'll run into difficulties with libaddr2line.a; Java because it 
triples the amount of build time and 3.4.5 doesn't support a shared 
runtime on mingw32.)

Have fun,
John E.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users