problems compiling gcc under Max OS X

Dan Allen danallen46@airwired.net
Sat Jul 12 21:47:00 GMT 2008


Thanks to Bill Broadley, Robert Fuller, Nicholas Miller, and Chris  
Jefferson for the help.

It appears that my issue #1 is related to the default build of  
gmp-4.2.2.  On my iMac with its Core2 Duo chip, gmp's ./configure  
script builds gmp with -m64 -mtune=k8.  This appears to be the root of  
the problems.  The build should be 32-bit, not 64-bit, and my machine  
does not have an AMD K8 in it!

Starting with gmp-4.2.2,  I found success by doing:

	./configure ABI="32" CFLAGS="-O2"
	make -j4
	sudo make install

Then with mpfr-2.3.1, I found success by doing exactly the same:

	./configure ABI="32" CFLAGS="-O2"
	make -j4
	sudo make install

Then with the folder gcc-4.3-20080710 (the latest GCC snapshot), I did:

	cd gcc-4.3-20080710
	mkdir build
	cd build
	../configure
	make

and voila: gcc-4.3.1 builds!

Perhaps this info can be added to GCC release notes so that others  
which want to build GCC-4.3 can build these required libraries properly.

<soapbox>
It would be MUCH BETTER to make these libraries part of the GCC  
sources as part of gcclib perhaps, and have them subsumed into a  
coherent whole so that everyone does not have to deal with this.  GCC  
has way too many external dependencies.  These dependencies need to be  
removed!
</soapbox>

BTW, I discovered all of this because on FreeBSD-7.0 CURRENT I can  
build gcc-4.3.1 and these libraries just fine on a Core2 Duo Toshiba  
laptop of mine.  I inspected their builds and found that they were not  
64-bit builds.  That is what gave me the clue.

So the bug is that the ./configure of gmp works on FreeBSD but does  
not on Mac OS X.

Dan





More information about the Gcc-help mailing list