[BuildTools] More tales of GCC 64-bit and Solaris

Lou Hafer lou at cs.sfu.ca
Fri Nov 16 12:13:59 EST 2007


Stefan, Andreas,

	As I keep poking at this, it just gets curiouser and curiouser. Thought 
I would post these comments so they are archived.
	
	I finally put the finishing touches on some scripts that allow me to
easily switch build environments (Studio / GCC, 32- / 64-bit, GCC version) on
both SPARC and x86 hardware, and can now do some comparisons between GCC
versions.

	I managed to get GCC 64-bit builds working on SPARC hardware with GCC
4.1.1; this required a patch to BuildTools because GCC 4.1.1 returned 32-bit
library directories for `gcc -m64 -print-search-dirs'.  While I was at INFORMS,
our systems staff installed GCC 4.2.1.  It *does* report the correct library
directories, returning 32-bit directories for `gcc -print-search-dirs', and
64-bit directories for `gcc -m64 -print-search-dirs'.

	Stefan, this might go a little ways toward explaining your observation
that setting CC to `gcc -m64' seemed to work, but you had trouble with CC=gcc
and ADD_CFLAGS=-m64. In fact, we might want to recommend that the 32- / 64-bit
flag be incorporated into CC / CXX / F77 just to make sure all of autotools see
it.

	This also means I need a more robust algorithm for patching the libtool
sys_lib_search_path_spec definition, one that will get it right if the spec is 
already correct.

	An analogous patch, using amd64 instead of sparcv9, is required for
Solaris / x86.  My guess is that if the underlying hardware is actually Intel,
yet another hardware designation will be required. Fortunately, I think I can 
just ask Solaris for the correct string (first value returned by `isainfo').

	More and more, I appreciate the systems knowledge already incorporated
in autotools.

							Lou



More information about the BuildTools mailing list