I'm trying to build gcc4.4.0 for an AMD Opteron cpu with an OpenSolaris kernel. My CFLAGS environment variable is completely ignored and as a result, some of the files get compiled for 32bits and some 64bits, so when it tries to link them, it fails. At least, that's what I think is happening. Here's my error: /usr/bin/ld: warning: i386:x86-64 architecture of input file `../build-i386-pc-solaris2.11/libiberty/libiberty.a(hashtab.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `../build-i386-pc-solaris2.11/libiberty/libiberty.a(xmalloc.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `../build-i386-pc-solaris2.11/libiberty/libiberty.a(xstrdup.o)' is incompatible with i386 output /usr/bin/ld: warning: i386:x86-64 architecture of input file `../build-i386-pc-solaris2.11/libiberty/libiberty.a(xexit.o)' is incompatible with i386 output build/genmodes -h > tmp-modes.h /bin/sh: line 1: 21076 Segmentation Fault (core dumped) build/genmodes -h >tmp-modes.h make[3]: *** [s-modes-h] Error 139 make[3]: Leaving directory `/export/home/jay/gcc-4.4.0/objdir/gcc' make[2]: *** [all-stage1-gcc] Error 2 make[2]: Leaving directory `/export/home/jay/gcc-4.4.0/objdir' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/export/home/jay/gcc-4.4.0/objdir' make: *** [all] Error 2 How do I get it to build everything with -m64 and how do I get it build everything without -g?