+tasks/build_darcs_%: tasks/extract_darcs_%
+ cd "build/$*" && $(MAKE)
+ touch $@
+
+tasks/build_extraheaders: $(upstream)/misc/extraheaders.sh tasks/build_newlib
+ # Add extra nestedvm specific headers to include
+ cd $(cross_root)/include && sh $<
+ touch $@
+
+tasks/build_libc: tasks/build_newlib tasks/build_extraheaders tasks/build_regex tasks/build_openbsdglob misc/extraheaders.sh $(patsubst %,$(root)/build/org/ibex/nestedvm/%.o, crt0 support support_aux)
+ # HACK: Get the top level makefile to build the support stuff
+ $(MAKE) -s -C $(root) $(patsubst %,build/org/ibex/nestedvm/%.o, crt0 support support_aux)
+
+ # Add our support stuff to libc
+ mips-unknown-elf-ar sr $(libc_a) $(patsubst %,$(root)/build/org/ibex/nestedvm/%.o, support support_aux)
+ rm -f $(cross_root)/lib/crt0.o
+ cp $(root)/build/org/ibex/nestedvm/crt0.o $(cross_root)/lib/crt0.o
+
+ touch $@
+
+tasks/build_linker: tasks/build_binutils $(root)/src/org/ibex/nestedvm/linker.ld
+ cp $(root)/src/org/ibex/nestedvm/linker.ld $(cross_root)/lib/ldscripts/nestedvm.ld
+ for f in $(cross_root)/lib/ldscripts/elf32ebmip.*; do \
+ rm -f "$$f"; \
+ ln -s nestedvm.ld "$$f"; \
+ done