This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
I Built GCC/GCJ 3.3 under MSYS/MingW! Woo hoo!
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: GCJ Java <java at gcc dot gnu dot org>
- Date: Sat, 08 Mar 2003 11:07:40 -0600
- Subject: I Built GCC/GCJ 3.3 under MSYS/MingW! Woo hoo!
- Reply-to: gnustuff at thisiscool dot com
Hi People,
I've managed to build GCC/GCJ 3.3 under MSYS 1.0.9 / MingW GCC 3.2.
The build is slow (6-10+ hours as opposed to 1.5 hours on Linux),
but it's a glimpse of what things could be like. The only major
hack is in jcf-io.c, but it is replacable with the right thing
to do. None of the hacks compromise the integrity of the source.
There is plenty of room for speeding up the build process,
especially when building libgcj.a. I'll document my observations
and personal next steps in a separate post on http://gcc.gnu.org/ml/java/
The future looks promising for MingW native GCC/GCJ builds!
Enjoy.
8 March 2003
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
-----------------------------------------------------------
Here are quick instructions for building GCC/GCJ 3.3 under
MSYS / MingW. I've hardcoded pathnames in these instructions
so if you use different ones, you'll have to extrapolate.
- Download my "Build Your Own GCC33 Under MingW Super Fun Pak" from:
http://www.thisiscool.com/BuildYourOwnGCC33UnderMingWSuperFunPak.zip (146K)
- Download these from http://sourceforge.net/project/showfiles.php?group_id=2435
binutils-2.13.90-20021006-2.tar.gz
mingw-runtime-2.4.tar.gz
w32api-2.2.tar.gz
MinGW-2.0.0-3.exe
MSYS-1.0.9-2003.02.17-1.exe
- Create directory C:\GCCTest
- Unzip my fun pack to C:\GCCTest
- Install MinGW-2.0.0-3.exe to c:\MingW
- Install MSYS-1.0.9-2003.02.17-1.exe to c:\msys.
Be sure to complete the post-install properly,
specifying c:/mingw for your mingw install directory.
(note forward slash, not backslash)
- Edit c:\msys\1.0\etc\fstab. Add line:
c:/GCCTest /GCCTest
- Close c:\msys\1.0\etc\fstab
- Copy or move flex.exe and bison*.*
from c:\GCCTest to c:\msys\1.0\bin
These are MingW builds of GNU flex and bison.
- Unzip gcc 3.3 sources to C:\GCCTest. You can get these
from several places:
- from CVS (see http://gcc.gnu.org/cvs.html for instructions
on getting the 3.3 branch)
- from a mirror site
example: http://mirrors.rcn.com/pub/sourceware/gcc/snapshots/2003-03-03/gcc-20030303.tar.gz
If you get them from a mirror, rename c:\GCCTest\gcc-XXXXXXX to c:\GCCTest\gcc.
- my personal, already-hacked-up snapshot (unzip to C:\):
http://www.thisiscool.com/GCC33Snapshot.zip (37M)
(If you use my personal snapshot, you won't have to apply any patches.)
If you've unzipped things properly, you should see the file ltcf-gcj.sh
in /GCCTest/gcc
- ONLY IF you HAVEN'T used my personal snapshot, you'll have to apply patches.
Start by applying these patches:
http://gcc.gnu.org/ml/java-patches/2003-q1/msg00677.html
Then apply c:/GCCTest/jcfiohack.diff
Then apply any other patches you like.
- Open an MSYS shell. Type:
cd /mingw
tar xfz /pathto/binutils-2.13.90-20021006-2.tar.gz
tar xfz /pathto/mingw-runtime-2.4.tar.gz
tar xfz /pathto/w32api-2.2.tar.gz
cd /GCCTest
mkdir w32gcc
cd w32gcc
mkdir gcc
mkdir g++_build
- If you haven't chosen the directories I mentioned
above, update cfgwingcc.sh and mkwingcc.sh in /GCCTest
and make the paths correct
- Still in the MSYS shell,
cd /GCCTest/w32gcc/gcc
mkdir mingw32
cd mingw32
tar xfz /pathto/mingw-runtime-2.4.tar.gz
tar xfz /pathto/w32api-2.2.tar.gz
cd /GCCTest/w32gcc/g++_build
../../cfgwingcc.sh
- If that went okay, type:
../../mkwingcc.sh
- If people have broken the MingW build, press [Ctrl+C]
to abort the install process, fix any compile errors
and retype ../../mkwingcc.sh
- Many hours later, your built 3.3 gcc/gcj will be in
/GCCTest/w32gcc/gcc. If you put /GCCTest/w32gcc/gcc/bin
at the front of your path, you can build stuff with it.
- Congratulations! Now repeatedly bang your head against the
wall and let out a primal cry of despair and anguish.
(Inside joke.)