I've gotten as for as I can by searching the Internet, but now I'm stuck. I'm trying to build a cross compiler from FC6 64bit to sparc-sun-solaris2.9. Eventually it fails with this error: /home/kyle/gcc-4.1.1/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/kyle/gcc-4.1.1/host-x86_64-unknown-linux-gnu/gcc/ -B/usr/sparc-sun-solaris2.9/bin/ -B/usr/sparc-sun-solaris2.9/lib/ -isystem /usr/sparc-sun-solaris2.9/include -isystem /usr/sparc-sun-solaris2.9/sys-include -DHAVE_CONFIG_H -I. -I../.././libgfortran -I. -iquote../.././libgfortran/io -I../.././libgfortran/../gcc -I../.././libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -O2 -g -O2 -c ../.././libgfortran/runtime/environ.c -fPIC -DPIC -o .libs/environ.o In file included from ../.././libgfortran/runtime/../io/io.h:36, from ../.././libgfortran/runtime/environ.c:37: ../.././libgfortran/../gcc/gthr.h:114:26: error: gthr-default.h: No such file or directory In file included from ../.././libgfortran/runtime/environ.c:37: ../.././libgfortran/runtime/../io/io.h:504: error: expected specifier-qualifier-list before '__gthread_mutex_t' --- error message continues --- I am using the official gcc 4.1.1 source code, but I have also tried the gcc 4.1.1 source code plus patches in FC6. Here is my configure and make line: make distclean; ./configure --target=sparc-sun-solaris2.9 --prefix=/usr --with-gnu-as --with-gnu-ld --with-sysroot=/usr/sparc-sun-solaris2.9/sys-root/ &>out.txt; make -j 4 1>>out.txt 2>>out.txt It appears like gthr-default.h was built for the host system, but not the target system: [kyle@ryoko gcc-4.1.1]$ find . -name gthr-default.h ./sparc-sun-solaris2.9/sparcv9/libstdc++-v3/include/sparc-sun-solaris2.9/bits/gthr-default.h ./sparc-sun-solaris2.9/libstdc++-v3/include/sparc-sun-solaris2.9/bits/gthr-default.h ./host-x86_64-unknown-linux-gnu/gcc/gthr-default.h [kyle@ryoko gcc-4.1.1]$ cat host-x86_64-unknown-linux-gnu/gcc/gthr-default.h #include "gthr-posix.h" [kyle@ryoko gcc-4.1.1]$ Ideally, I'd like gcc and other programs than run on FC6 to use posix threads. I'd like any libraries or compiled code for Solaris to use solaris threads. If I pass --enable-threads=solaris, then host-x86_64-unknown-linux-gnu/gcc/gthr-default.h will include gthr-solaris.h. Will that affect the threads that tools that run on FC6 use? I already have the binutils for sparc-sun-solaris2.9 setup. I used the --with-sysroot option during the configure so that it supports the --sysroot option. [kyle@ryoko gcc-4.1.1]$ /usr/bin/sparc-sun-solaris2.9-ld -V GNU ld version 2.17.50.0.6-2 20061020 Supported emulations: elf32_sparc elf64_sparc I couldn't find docs on where I should put the Solaris files on my machine. So I put them in /usr/sparc-sun-solaris2.9/lib, etc., and I setup a sysroot with symlinks. I copied over the files from SUNWarc, SUNWarcx, SUNWhea, SUNWlibm, SUNWlibms, SUNWlmsx, SUNWcsl, and SUNWcslx. [kyle@ryoko gcc-4.1.1]$ ls -l /usr/sparc-sun-solaris2.9/ total 76 drwxr-xr-x 2 root root 4096 Feb 4 16:28 bin drwxr-xr-x 3 root root 4096 Feb 3 21:24 ccs drwxr-xr-x 23 root root 12288 Feb 4 13:29 include drwxr-xr-x 10 root root 12288 Feb 4 13:29 lib drwxr-xr-x 3 root root 4096 Feb 3 21:24 sfw lrwxrwxrwx 1 root root 7 Feb 3 21:02 sys-include -> include drwxr-xr-x 3 root root 4096 Feb 4 16:06 sys-root drwxr-xr-x 3 root root 4096 Feb 3 21:24 xpg4 [kyle@ryoko gcc-4.1.1]$ ls -l /usr/sparc-sun-solaris2.9/sys-root/usr/ total 24 lrwxrwxrwx 1 root root 9 Feb 4 16:06 bin -> ../../bin lrwxrwxrwx 1 root root 9 Feb 4 16:06 ccs -> ../../ccs lrwxrwxrwx 1 root root 14 Feb 4 16:07 include -> ../../include/ lrwxrwxrwx 1 root root 10 Feb 4 16:07 lib -> ../../lib/ lrwxrwxrwx 1 root root 9 Feb 4 16:07 sfw -> ../../sfw lrwxrwxrwx 1 root root 11 Feb 4 16:07 xpg4 -> ../../xpg4/ [kyle@ryoko gcc-4.1.1]$ Thanks, Kyle