This is a port of GDC to work with NestedVM, so you can generate Java bytecode
from D.
Diff against GDC 0.24
Diff against GDC 0.21
Sockets and threads don't work yet. Sockets could fairly easily, threads would
be pretty difficult.
How to install GDC for NestedVM
1) NestedVM
If you already have NestedVM, you can skip this step.
- Extract NestedVM
- Compile basic NestedVM
- Compile the C++ compiler
- cd upstream ; make tasks/build_gcc_step2
- If you needed to use an old gcc for the last step, you'll need to do the same for this step.
2) GDC for NestedVM
- Add NestedVM to your PATH
- export PATH="$NESTEDVM_DIR/upstream/install/bin:$PATH"
- Bootstrap a fresh cross-compiler directory
- mkdir -p $PREFIX
cp -pR $NESTEDVM_DIR/upstream/install/mips-unknown-elf $PREFIX
- Extract a fresh GCC 4.0.x
- Extract a frech GDC
- Apply the nestedvm-gdc patch to GDC
- cd gcc-4.0.x/gcc/d ; patch -p0 -i $GDC_NESTEDVM_PATCHFILE
- Apply the GDC patch to GCC
- cd gcc-4.0.x ; ./gcc/d/setup-gcc.sh
- Make a build directory
- Configure GCC and GDC
- cd gcc-4.0.x/build
../configure --prefix="$PREFIX" --target=mips-unknown-elf --disable-threads --with-gnu-ld --with-gnu-as --with-newlib=yes --enable-sjlj-exceptions --disable-multilib --enable-languages=c,c++,d
- Build and install GCC and GDC
- DFLAGS="-O2 -g -msoft-float -mmemcpy -ffunction-sections -fdata-sections -falign-functions=512 -fno-rename-registers -fno-schedule-insns -fno-delayed-branch" make all install
- Install wrapper script
- wget http://www.codu.org/nestedvm-gdc/gdcj -O $PREFIX/bin/gdcj ; chmod 0755 $PREFIX/bin/gdcj
- Install Java components into prefix
- mkdir -p $PREFIX/lib/m2j ; cp -pR $NESTEDVM_DIR/build/org $NESTEDVM_DIR/upstream/build/classgen/build/org $PREFIX/lib/m2j