--Forwarded Message Attachment-- Date: Sun, 14 Sep 2008 12:06:49 +0200 From: oyvind To: gcc-help Subject: Problems building Windows hosted powerpc/arm/mips-elf toolchain using Linux as build machine CC: aaron > [o] I'm trying to build a powerpc/arm/mips-elf toolchain hosted on Windows using > [o] Linux as the build machine but I'm running into the following error: I believe you are missing the cygwin "sysroot", and cygwin targeting linux hosted cross compiler. Cross compilers and "Canadian" compilers are a bit tricky.. Since I haven't yet accomplished what you are trying to do, I'd suggest you follow my lead (I hope you realize the half bogosity of my reasoning). Specifically, install Cygwin on your Windows machine and just do your builds there. But that doesn't address the mips-elf sysroot.. The right way is more like this, but I haven't done it wrt Cygwin (I have with Solaris). Install Cygwin (like I said). In Cygwin cd / tar cfz cygwinsysroot.tar.gz /usr/include /usr/lib /lib The exact required files is to be determined. Obviously /usr/lib and /lib is bogus. You can just take /lib and after extracting, link usr/lib to it. On Cygwin /usr/bin == /bin, and /usr/lib == /lib. This is a Cygwin-ism to avoid having to chose between them. Reasonable. copy cygwinsysroot.tar.gz to your Linux machine. mkdir -p /usr/local/i686-pc-cygwin/sys-root This path is deliberately chosen. configure defaults to it when you use -with-sysroot but don't give it an "=path" part. cd /usr/local/i686-pc-cygwin/sys-root tar xf cygwinsysroot.tar.gz build cygwin targeting compiler first this will be used to build the cygwin hosted compiler mkdir /obj/1 cd /obj/1 /src/gcc/configure -host `/src/gcc/config.guess` -target i686-pc-cygwin make make install and then the cygwin hosted compiler mkdir /obj/2 cd /obj/2 /src/gcc/configure -host i686-pc-cygwin -target mips-elf -with-sysroot ... make make install DESTDIR=/usr/local/cygwin/install tar czf install.tar.gz /usr/local/cygwin/install and then extract install.tar.gz on your Cygwin system. Or maybe you can install over NFS or Samba or such. I wish this could be more automated, but in general it requires a bunch of files from disparate sources, including stuff with varying licenses, not even always source. e.g. targeting anything other than *BSD, Linux (newlib or glibc), Cygwin, DJGPP, or now Solaris. e.g. MinGW, AIX, Irix, HP-UX. Perhaps perhaps perhaps that first list could be made easier. - Jay