X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=upstream%2FMakefile;h=59a9eff7883377be7f496303152953e3997f1fba;hp=7a25beed4ea53055f474b050651d4092b923347c;hb=f9d53cdf4016db2ff68f1fd3e092b889fcee8cf1;hpb=6ca8e846620f8c46811c8417b6f9b7f05d79a706 diff --git a/upstream/Makefile b/upstream/Makefile index 7a25bee..59a9eff 100644 --- a/upstream/Makefile +++ b/upstream/Makefile @@ -2,17 +2,17 @@ version_gcc = 3.3.3 -url_gcc-core = http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(version_gcc)/gcc-core-$(version_gcc).tar.gz -url_gcc-c++ = http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(version_gcc)/gcc-g++-$(version_gcc).tar.gz -url_gcc-g77 = http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(version_gcc)/gcc-g77-$(version_gcc).tar.gz +url_gcc-core = http://mirrors.kernel.org/gnu/gcc/releases/gcc-$(version_gcc)/gcc-core-$(version_gcc).tar.gz +url_gcc-c++ = http://mirrors.kernel.org/gnu/gcc/releases/gcc-$(version_gcc)/gcc-g++-$(version_gcc).tar.gz +url_gcc-g77 = http://mirrors.kernel.org/gnu/gcc/releases/gcc-$(version_gcc)/gcc-g77-$(version_gcc).tar.gz -patches_gcc = gcc-fixes.patch gcc-fdata-sections-bss.patch +patches_gcc = gcc-fixes.patch gcc-fdata-sections-bss.patch gcc-64bitclean.patch configure_gcc = --target=mips-unknown-elf --disable-threads --with-gnu-ld --with-gnu-as --with-newlib=yes --enable-sjlj-exceptions --enable-languages="c" configure_gcc_step2 = $(configure_gcc) --enable-languages="c,c++,f77" - version_gpc = 20030830 -url_gpc = http://www.gnu-pascal.de/alpha/gpc-$(version_gpc).tar.gz +#url_gpc = http://www.gnu-pascal.de/alpha/gpc-$(version_gpc).tar.gz +url_gpc = http://www.megacz.com/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" @@ -22,8 +22,8 @@ patches_binutils = binutils-no64.patch binutils-nocompilein.patch configure_binutils = --target=mips-unknown-elf version_newlib = 1.11.0 -url_newlib = http://mirrors.rcn.net/pub/sourceware/newlib/newlib-$(version_newlib).tar.gz -patches_newlib = newlib-mips.patch newlib-tzset.patch newlib-malloc.patch newlib-vasprintf.patch newlib-nomemcpy.patch +url_newlib = http://mirrors.kernel.org/gnu/newlib/newlib-$(version_newlib).tar.gz +patches_newlib = newlib-mips.patch newlib-tzset.patch newlib-malloc.patch newlib-nomemcpy.patch newlib-unix.patch configure_newlib = --enable-multilib --target=mips-unknown-elf url_openbsdglob = http://www.brianweb.net/xwt/openbsdglob.tar.gz @@ -31,6 +31,10 @@ url_regex = ftp://ftp.zoo.toronto.edu/pub/regex.shar url_linpack = http://www.math.iastate.edu/burkardt/f_src/linpack_bench/linpack_bench.f +version_gmp = 4.1.4 +url_gmp = ftp://ftp.gnu.org/gnu/gmp/gmp-$(version_gmp).tar.gz +configure_gmp = --host=mips-unknown-elf + darcs_gcclass = http://darcs.brianweb.net/gcclass darcs_classgen = http://darcs.brianweb.net/classgen @@ -55,10 +59,11 @@ cross_root := $(usr)/mips-unknown-elf tasks/download_%: if [ -z "$(url_$*)" ]; then echo "No url for $*" >&2; false; fi mkdir -p download - cd download && wget --passive-ftp -N $(url_$*) + cd download && curl -O $(url_$*) touch $@ tasks/extract_%: tasks/download_% + if [ -e $@ ]; then echo "Error: $@ exists. something isn't right"; false; else true; fi mkdir -p build cd build && \ gzip -dc ../download/$*-$(version_$*).tar.gz | $(TAR) -xf - && \ @@ -67,6 +72,7 @@ tasks/extract_%: tasks/download_% touch $@ tasks/extract_darcs_%: + if [ -e $@ ]; then echo "Error: $@ exists. something isn't right"; false; else true; fi mkdir -p build if [ -z "$(darcs_$*)" ]; then echo "No darcs url for $*" >&2; false; fi if [ -d "$(root)/_darcs" ]; then \ @@ -83,25 +89,26 @@ update_darcs_%: tasks/extract_darcs_% else \ cd "build/$*" && wget -np -nH --cut-dirs=1 -rl 16 -N -X _darcs $(darcs_$*); \ fi - rm "tasks/build_darcs_$*" # to force a rebuild + rm -f "tasks/build_darcs_$*" # to force a rebuild tasks/build_darcs_%: tasks/extract_darcs_% cd "build/$*" && $(MAKE) touch $@ +# Add extra nestedvm specific headers to include tasks/build_extraheaders: $(upstream)/misc/extraheaders.sh tasks/build_newlib - # Add extra nestedvm specific headers to include + cd $(cross_root)/include && sh $< touch $@ top_lev_stuff := $(patsubst %,../build/org/ibex/nestedvm/%.o, crt0 support support_aux) +# HACK: Get the top level makefile to build the support stuff $(top_lev_stuff): - # HACK: Get the top level makefile to build the support stuff $(MAKE) -C .. $(top_lev_stuff:../%=%) +# Add our support stuff to libc tasks/build_libc: tasks/build_newlib tasks/build_extraheaders tasks/build_regex tasks/build_openbsdglob misc/extraheaders.sh $(top_lev_stuff) - # Add our support stuff to libc mips-unknown-elf-ar sr $(cross_root)/lib/libc.a $(patsubst %,../build/org/ibex/nestedvm/%.o, support support_aux) mips-unknown-elf-ar sr $(cross_root)/lib/single-float/libc.a $(patsubst %,../build/org/ibex/nestedvm/%.o, support support_aux) rm -f $(cross_root)/lib/crt0.o @@ -125,15 +132,8 @@ clean_%: tasks/download_gcc: tasks/download_gcc-core tasks/download_gcc-c++ tasks/download_gcc-g77 touch $@ -tasks/extract_%: tasks/download_% - mkdir -p build - cd build && \ - gzip -dc ../download/$*-$(version_$*).tar.gz | $(TAR) -xf - && \ - rm -f $* && \ - ln -s $*-$(version_$*) $* - touch $@ - tasks/extract_gcc: tasks/download_gcc + if [ -e $@ ]; then echo "Error: $@ exists. something isn't right"; false; else true; fi mkdir -p build cd build && gzip -dc ../download/gcc-core-$(version_gcc).tar.gz | $(TAR) -xf - cd build && gzip -dc ../download/gcc-g++-$(version_gcc).tar.gz | $(TAR) -xf - @@ -141,9 +141,10 @@ tasks/extract_gcc: tasks/download_gcc touch $@ tasks/patch_%: tasks/extract_% + if [ -e $@ ]; then echo "Error: $@ exists. something isn't right"; false; else true; fi cd build/$*-$(version_$*) && \ for p in $(patches_$*) end; do \ - [ "$$p" = "end" ] || $(PATCH) -p0 < ../../patches/$$p || exit 1; \ + [ "$$p" = "end" ] || $(PATCH) -p0 -l < ../../patches/$$p || exit 1; \ done touch $@ @@ -164,6 +165,7 @@ tasks/build_gcc_step2: tasks/patch_gcc tasks/build_libc touch $@ 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 - && \ @@ -176,15 +178,15 @@ tasks/extract_gpc: tasks/download_gcc tasks/download_gpc 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 + # 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 + + # 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 $@ tasks/build_openbsdglob: tasks/download_openbsdglob tasks/build_newlib @@ -211,7 +213,14 @@ tasks/build_regex: tasks/download_regex tasks/build_newlib cp libregex.a $(usr)/mips-unknown-elf/lib touch $@ - +tasks/build_gmp: tasks/patch_gmp tasks/build_libc + cd build/gmp && \ + CFLAGS="$(MIPS_CFLAGS)" LDFLAGS="$(MIPS_LDFLAGS)" \ + ./configure --prefix=$(usr) $(configure_gmp) && \ + make && \ + make install exec_prefix=$(usr)/mips-unknown-elf includedir=$(usr)/mips-unknown-elf/include + touch $@ + # # Tests # These are simply here for convenience. They aren't required @@ -226,11 +235,12 @@ url_libmspack = http://www.kyz.uklinux.net/downloads/libmspack-$(version_libmspa patches_libmspack = libmspack.patch version_freetype = 2.1.4 -url_freetype = http://umn.dl.sourceforge.net/sourceforge/freetype/freetype-$(version_freetype).tar.gz +url_freetype = http://easynews.dl.sourceforge.net/sourceforge/freetype/freetype-$(version_freetype).tar.gz patches_freetype = freetype.patch ft-nostdio.patch version_boehmgc = 6.3alpha2 -url_boehmgc = http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc$(version_boehmgc).tar.gz +#url_boehmgc = http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc$(version_boehmgc).tar.gz +url_boehmgc = http://www.brianweb.net/misc/gc$(version_boehmgc).tar.gz patches_boehmgc = boehm-gc.patch version_busybox = 1.00-pre9 @@ -240,6 +250,10 @@ patches_busybox = busybox.patch version_texinputs = 1.0 url_texinputs = http://www.megacz.com/tmp/texinputs-$(version_texinputs).tgz +version_samba = 3.0.4 +url_samba = http://us4.samba.org/samba/ftp/samba-$(version_samba).tar.gz +patches_samba = samba.patch + tasks/extract_libjpeg: tasks/download_libjpeg mkdir -p build cd build && \ @@ -315,9 +329,7 @@ tasks/build_busybox: tasks/patch_busybox tasks/build_libc tasks/extract_tex_tangle: @mkdir -p build/tex - cd build/tex && \ - curl -o tex.web http://www.math.uni.wroc.pl/~hebisch/tex_p/tex.web && \ - curl http://www.gnu-pascal.de/crystal/gpc/en/attachments/5593/tangle.p.gz | zcat > tangle.p + cd build/tex && curl -o tex.web http://www.math.uni.wroc.pl/~hebisch/tex_p/tex.web touch $@ tasks/build_tex_tangle: tasks/extract_tex_tangle tasks/build_gpc @@ -327,15 +339,15 @@ tasks/build_tex_tangle: tasks/extract_tex_tangle tasks/build_gpc tasks/build_tex: tasks/build_tex_tangle tasks/build_gpc tasks/download_texinputs @mkdir -p build/tex - - # HACK: Build Tangel.class + + # HACK: Build Tangel.class make -C $(root) build/tests/Tangle.class - + rm -f build/tex/tex.p build/tex/tex.pool cp misc/tex.ch build/tex/tex.ch cd build/tex && \ $(TAR) xfz ../../download/texinputs-$(version_texinputs).tgz && \ - java -cp $(root)/build tests.Tangle \ + java -cp $(root)/build:$(upstream)/build/classgen/build tests.Tangle \ --gpc-rts=-nPascalfile:tex.p \ --gpc-rts=-npool:tex.pool \ --gpc-rts=-nwebfile:tex.web \ @@ -343,3 +355,12 @@ tasks/build_tex: tasks/build_tex_tangle tasks/build_gpc tasks/download_texinputs && \ mips-unknown-elf-gpc $(MIPS_PCFLAGS) tex.p $(MIPS_LDFLAGS) -o tex.mips touch $@ + +tasks/build_samba: tasks/patch_samba + cd build/samba-$(version_samba)/source && \ + test -e config.status || ./configure --host=mips-unknown-elf && \ + fgrep -q '#define HAVE_GETTIMEOFDAY_TZ' include/config.h || \ + echo '#define HAVE_GETTIMEOFDAY_TZ 1' >> include/config.h && \ + make LIBS="-lglob" CFLAGS="$(MIPS_CFLAGS)" LDFLAGS="$(MIPS_LDFLAGS)" \ + CONFIGFILE="smb.conf" proto_exists bin/ntlm_auth + touch $@