id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
2966	build system does not respect --with-gcc=	duncan	igloo	"The ./configure scripts for all the core libs do not respect the  `--with-gcc=` flag. The current build system passes this flag but it gets ignored.

This means that overall the ghc build does not respect the `--with-gcc=` flag. This is kind of annoying for doing a build on Solaris, since we have to use a gcc other than the standard system one.

When using a 'fake' gcc on the `$PATH` (a shell script that always fails), we get:
{{{
ghc/libraries/unix $ ./configure --with-gcc=/opt/gcc-vanilla/4.1.2/bin/gcc
configure: WARNING: unrecognized options: --with-gcc
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: in `/home/duncan/prgs/ghc/libraries/unix':
configure: error: C compiler cannot create executables
See `config.log' for more details.
}}}

The same problem occurs with: base, directory, process, old-time and editline. These are all of the core packages that use `./configure` scripts.

On the other hand they all seem to check the `CC` environment variable.

Perhaps the ghc build system should pass `--with-gcc=` to the Cabal Setup, and perhaps that should call configure with `CC` set.

The problem applies to ghc-6.8.3 and ghc-HEAD (so probably also 6.10.x)."	merge	closed	normal	6.12.2	Build System	6.12.1	fixed			Unknown/Multiple	Unknown/Multiple	Building GHC failed	Unknown				
