[CMake] darwin, cmake-2.8, gfortran from fink: option "-arch" not recognized

Martin Costabel costabel at wanadoo.fr
Thu Jun 10 18:01:33 EDT 2010


Daniel Franke wrote:
> Hi all.
> 
> I got gcc-4.4.4 for target i386-apple-darwin9.8.0 from fink. First I used 
> cmake-2.6 (also from fink) and everything worked. Later, after an update to 
> cmake-2.8 (again, from fink), and trying to rebuild my package, I got:
> 
> 	f951: error: unrecognized command line option "-arch"
> 
> As far as I can tell, "-arch" is not an option of FSF GCC. However, the GCC 
> docs mention:

FSF gcc does recognize -arch. But the fortran compiler does not. There 
you have to use -m32 or -m64.

cmake-2.8 introduced indeed some "improved" compiler and linker flags 
for MacOSX that are rather annoying for Fink builds, which do neither 
fat builds nor cross-compiling. You can get rid of some of them by using 
the cmake flags

  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=""
  -DCMAKE_OSX_SYSROOT:PATH="/"

Maybe this helps with your problem, too.

-- 
Martin





More information about the CMake mailing list