[CMake] CMake problem on Solaris with suncc

Bill Hoffman bill.hoffman at kitware.com
Mon Oct 27 10:47:20 EDT 2008


Gerhard Gappmeier wrote:
> Hi
> 
> 
> this was a good tip to configure the compiler using the environment 
> variables.
> I just changed -m64 to the old xtarget settings, because this is to new 
> for my compiler.
> I removed all compiler settings from the CMakeLists.txt and now it seems 
> to work, except from the assembler.
> 
> 
> Now I'm using this environment.
> 
> 
> #!/bin/bash
> # configure compiler
> CC=/home/local/opt/SUNWspro.11/bin/cc
> CXX=/home/local/opt/SUNWspro.11/bin/CC
> CPP=$CXX
> CFLAGS="-xtarget=ultra -xarch=v9"
> CXXFLAGS="-xtarget=ultra -xarch=v9"
> LDFLAGS="-xarch=v9"
> # configure cmake
> PATH=$PATH:/home/sag/cmake-2.6.2-SunOS-sparc/bin
> export PATH CC CXX CPP CFLAGS CXXFLAGS LDFLAGS
> 
> 
> When compiling the assembler file I now get the error
> /usr/ccs/bin/as: "/path/to/file/platforms/linux/cas32.s", line 7: error: 
> cannot use v8plus instructions in a non-v8plus target binary
> 
> 

You have to start with an empty cache.  Re-run cmake with no 
CMakeCache.txt.  Then make sure the CMAKE_C_FLAGS are correct.

-Bill


More information about the CMake mailing list