This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Step-By-Step Build Instructions for MinGW gcc/gcj 3.4 Compilers
- From: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- To: <java at gcc dot gnu dot org>
- Date: Mon, 28 Jul 2003 10:54:09 +0200
- Subject: Re: Step-By-Step Build Instructions for MinGW gcc/gcj 3.4 Compilers
I've briefly read up on Mohans latest and greatest lately,
and like others I smell a completely automatic download
and compile script.
Below is what I've written so far. Nothing genious, but it
enumerates various issues.
#!/bin/sh
# This script will download and compile GCC/GCJ for Windows. Plan
# to run it overnight. The script exits if it runs into an error,
# and there is no recovery/resume mechanism.
#
#
#
# Author(s):
#
# Oyvind Harboe
# This script standeth on the shoulders of giants: Mohan, Ranjit, etc.
#
# Usage:
#
# 0. CD to a directory where you have enough space to compile GCC/GCJ.
#
# 1. Download this script
#
# $ wget http://www.thisiscool.com/downloadcompile.sh
#
# 2. Execute this script.
#
# $ sh compilegcj.sh
#
# 3. The compiled result is installed in <workdir>/gcc/build/wingcc.
# (This will take a long time, plan to do it overnight).
#
# Tips:
#
# - To log output from script, invoke as "sh downloadcompile.sh 2&>1 |
tee logfile.txt"
#
# Issues:
#
# - the dependency upon the /datal mount could be removed by adding an
# environment variable set to the pwd at the beginning of this script
# - $TEMP and $TMP by default point to paths which are incompatible with
# CYGWIN=check_case:strict.
# - The scripts this script invokes should be modified to exit
# immediately upon an error
# - The configure/compile/install should run without requiring user
# interaction
# - The download paths to the MinGW stuff on Sourceforge is hardcoded
# to the Belgium mirror. I'm sure the Belgium mirror can cope, but
# perhaps there is some simple way to do this a bit better. No biggie.
# - It should be tested on both Linux and CygWin
# - Add check that all the necessary tools are in place upfront.
# Most importantly check that CygWin has the right tools installed,
# as most Linux hackers will get all the tools they need by having
# chosen to install the "Developer" stuff.
# - Add command line to compile various versions of GCC: 3.3 branch, 3.3
# branch with Mohans patches, 3.4 CVS, 3.4 CVS w/Mohans patches, last
known
# stable Mohan 3.3/3.4 w/patches
# - The script is a bit wasteful in w/bandwidth and compile times w.r.t.
# using it for a "GCJ daily build" server.
# Exit processing if a command fails
set -e
# Working directory
mount --user --force `cygpath --absolute --windows .` /datal
mkdir gcc
cd gcc
# Get compilation scripts
wget http://www.thisiscool.com/mingw32-gcc-scripts.tar.gz
tar xvfz mingw32-gcc-scripts.tar.gz
# Get various MinGW sources
mkdir sources
wget
http://belnet.dl.sourceforge.net/sourceforge/mingw/binutils-2.14.90-2003
0612-1.tar.gz
wget
http://belnet.dl.sourceforge.net/sourceforge/mingw/binutils-2.14.90-2003
0612-1-src.tar.gz
wget
http://belnet.dl.sourceforge.net/sourceforge/mingw/mingw-runtime-3.0.tar
.gz
wget
http://belnet.dl.sourceforge.net/sourceforge/mingw/w32api-2.3.tar.gz
cd ..
# Download the GCC sources
cd /datal/gcc
. /datal/gcc/scripts/cvs/genv
co34.sh
cd gcc
contrib/gcc_update --touch
# apply some patches
cd /datal/gcc/gcc/gcc/java/
patch -N -p0 < /datal/gcc/diffs/34/msg00565.diff
cd /datal/gcc/gcc/libjava/
patch -N -p0 < /datal/gcc/diffs/34/msg00064.diff
# Build cross compiler
cd /datal/gcc/scripts/build/
./buildxgcc.sh
# Build native compiler
cd /datal/gcc/scripts/build/
./buildwgcc.sh