Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
*** Cross compiling hbc *** Cross compiling lmlc/hbc is a rather complex process, but I think these are steps to do. (All this should be simplified, of course, but I don't have time.) 1) Get the source, configure it and compile the normal way. I.e. run './configure', answer the questions, and 'make universe'. 2) Run './configure' and use the default answers, but answer 'n' to the questions if you want Haskell and the interactive system. Edit Makefile and change 'MTARGET' to whatever your target machine is (it should be the name of one of the m_ directories). DON'T RUN make as the script tells you. 3) Run 'make all' to build the cross compiler. 4) Build the masm program by 'make myinstall'. 5) Switch to the cross compiler by mv lmlcomp bin setenv LMLDIR `pwd` 6) Build .s versions of all files by rm */*.o; rm */*/*.o; rm ilml/predefs.s make -k MFLAGS='LMLFLAGS=-S ASMFLAGS=-S' all Various complaints are normal during this stage. 7) Remove some junk files that got built rm */*.o; rm */*.a 8) Move the whole directory tree in src to the target and proceed with the following steps there. 9) Configure for the target, i.e. run './configure', don't use the defaults, answer the questions for the target, still answer 'n' to the questions about Haskell and the interactive system. DON'T RUN make as the script tells you. setenv LMLDIR `pwd` 10) Run the assembler on all .s files, with csh you can do foreach f (*/*.s) echo $f # for entertainment only as $f -o $f:r.o end 11) Build the parsers cd syntax make clean make 12) Build the lml library by these steps: cd ../lib Edit lib.index and remove the last line if it contains '_@'. make -t Maxl.o Minl.o itosf.o leftadj.o stoi.o isalpha.o isalnum.o iscntrl.o ispunct.o difference.o union.o group.o index.o takeword.o scan.o Figure out the correct value of the SYSTEM variable by 'grep SYSTEM ../Makefile' and use it instead of XXX below. make SYSTEM=XXX lib.a libstub.a cp lib.a lib_i.a 13) Build the runtime system: cd ../runtime make SYSTEM=XXX 14) Build the driver cd ../lmlc make clean make SYSTEM=XXX Install lmlc somewhere in your path. 15) Build the compiler itself cd .. make If you are lucky you've now got a compiler for the target. 16) Test the compiler cp lmlcomp bin echo 1 > m.m lmlc m.m a.out This should print '1'. 17) Clean up, and check that the compiler can recompile itself rm */*.s; rm bin/masm.* bin/cinter runtime/cinter make myinstall make fixtest This takes a long time since it recompiles the compiler twice. 18) Run './configure' again and answer the questions the way you want (e.g. turning on Haskell). make universe make install