I try to build a mips-elf gcc hosting on cygwin under Linux. First, I try to build binutils. ------------------------------------ env CC=gcc ../binutils-2.15/configure --prefix=/rootfs/reachpan/tmp --target=mips-elf --host=i686-pc-cygwin --build=i686-host_pc-linux-gnu ------------------------------------ Errors occur while building: ------------------------------------ i686-pc-cygwin-ar rc ./libiberty.a \ ./regex.o ./cplus-dem.o ./cp-demangle.o ./cp-demint.o ./md5.o ./alloca.o ./argv.o ./choose-temp.o ./concat.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./physmem.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./strerror.o ./strsignal.o ./ternary.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./mkstemps.o ./strncmp.o make[1]: i686-pc-cygwin-ar: Command not found make[1]: *** [libiberty.a] Error 127 make[1]: Leaving directory `/rootfs/reachpan/toolchain/Build/libiberty' make: *** [all-libiberty] Error 2 ------------------------------------ And I try again by specifying 'AR': ------------------------------------ env CC=gcc AR=ar ../binutils-2.15/configure --prefix=/rootfs/reachpan/tmp --target=mips-elf --host=i686-pc-cygwin --build=i686-host_pc-linux-gnu ------------------------------------ There are still errors: ------------------------------------ /bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o libbfd.la -rpath /rootfs/reachpan/tmp/i686-pc-cygwin/mips-elf/lib -release 2.15 archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo archive64.lo `cat ofiles` ./libtool: line 310: cygpath: command not found mkdir .libs libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries lib /OUT:.libs/libbfd.lib archive.o archures.o bfd.o bfdio.o bfdwin.o cache.o coffgen.o corefile.o format.o init.o libbfd.o opncls.o reloc.o section.o syms.o targets.o hash.o linker.o srec.o binary.o tekhex.o ihex.o stabs.o stab-syms.o merge.o dwarf2.o simple.o archive64.o elf32-mips.o elfxx-mips.o elf32.o elf.o elflink.o elf-strtab.o elf-eh-frame.o dwarf1.o ecofflink.o elf64-mips.o elf64.o elf64-gen.o elf32-gen.o cpu-mips.o ./libtool: line 4776: lib: command not found make[3]: *** [libbfd.la] Error 127 make[3]: Leaving directory `/rootfs/reachpan/toolchain/Build/bfd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/rootfs/reachpan/toolchain/Build/bfd' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/rootfs/reachpan/toolchain/Build/bfd' make: *** [all-bfd] Error 2 ------------------------------------ What should I do to reslove this problem?