+
+## gpc ##############################################################################
+
+version_gpc = 20030830
+#url_gpc = http://www.gnu-pascal.de/alpha/gpc-$(version_gpc).tar.gz
+url_gpc = http://nestedvm.ibex.org/upstream/gpc-$(version_gpc).tar.gz
+patches_gpc = $(patches_gcc) gpc-with-3.3.3.patch gpc-noutils.patch
+configure_gpc = $(configure_gcc) --enable-languages="pascal"
+
+tasks/extract_gpc: tasks/download_gcc tasks/download_gpc
+ if [ -e $@ ]; then echo "Error: $@ exists. something isn't right"; false; else true; fi
+ mkdir -p build/gpc.extract
+ cd build/gpc.extract && \
+ gzip -dc ../../download/gcc-core-$(version_gcc).tar.gz | $(TAR) -xf - && \
+ gzip -dc ../../download/gpc-$(version_gpc).tar.gz | $(TAR) -xf - && \
+ test ! -e gcc-$(version_gcc)/gcc/p && \
+ mv gpc-$(version_gpc)/p gcc-$(version_gcc)/gcc/p
+ mv build/gpc.extract/gcc-$(version_gcc) build/gpc-$(version_gpc)
+ rm -rf build/gpc.extract
+ touch $@
+
+tasks/build_gpc: tasks/patch_gpc tasks/build_libc
+ mkdir -p $(usr)
+ # We need to preapply this patch because gpc's configury doesn't like 3.3.3
+ cd build/gpc-$(version_gpc) && cat gcc/version.c | grep -q GPC || $(PATCH) -p0 < gcc/p/diffs/gcc-3.3.diff
+
+ # echo | is to dismiss the gcc version warning
+ mkdir -p build/gpc-obj && cd build/gpc-obj && \
+ echo | ../gpc-$(version_gpc)/configure --prefix=$(usr) $(configure_gpc) && \
+ $(MAKE) TARGET_CFLAGS="$(MIPS_CFLAGS)" && \
+ cd gcc && $(MAKE) pascal.install
+
+ touch $@
+
+
+## binutils ##############################################################################
+
+version_binutils = 2.14
+url_binutils = ftp://ftp.gnu.org/gnu/binutils/binutils-$(version_binutils).tar.gz
+patches_binutils = binutils-no64.patch binutils-nocompilein.patch
+configure_binutils = --target=mips-unknown-elf
+
+## newlib ##############################################################################
+
+version_newlib = 1.11.0
+url_newlib = ftp://sources.redhat.com/pub/newlib/newlib-$(version_newlib).tar.gz
+patches_newlib = newlib-mips.patch newlib-tzset.patch newlib-malloc.patch newlib-nomemcpy.patch newlib-unix.patch newlib-unistd.patch newlib-nestedvm-define.patch
+configure_newlib = --enable-multilib --target=mips-unknown-elf
+
+tasks/build_newlib: tasks/build_gcc
+
+## openbsdglob ##############################################################################
+
+url_openbsdglob = http://www.brianweb.net/xwt/openbsdglob.tar.gz
+