[CMake] ASM issue: regression from 2.6.0 to 2.6.2?

Alexander Neundorf a.neundorf-work at gmx.net
Fri Oct 17 14:09:27 EDT 2008


Hi,

On Friday 17 October 2008, Alexander Neundorf wrote:
> On Thursday 16 October 2008, you wrote:
> ...
>
> > > Btw. why do you need CMAKE_FORCE_C_COMPILER, i.e. why doesn't "arm-
> > > elf-gcc
> > > main.c" work ?
> >
> > I really don't know ;-)
> >
> > This is one of the oldest directive I've copied from a web site
> > example about how to perform cross-compilation with CMake.
>
> Where exactly ?
> It should only be used if the compiler can't build an executable without
> special help (most compilers can).
> Ah, I see.
> You don't have a toolchain file which you need for cross compiling, i.e.
> cmake starts detecting everything and sets things up and then your settings
> are most probably too late.
> Did you follow the instructions given here ?
> http://www.cmake.org/Wiki/CMake_Cross_Compiling

I have problems reproducing the problem.
See the attached example, I tried for powerpc using the attached toolchain 
file (which is specific for my system, i.e. you have to modify it so it 
matches yours).
It finds (without additional help) the cross assembler and builds the 
executable in the sub1/ directory, with the -maltivec flag.
Can you please modify this so that it fails for you ?

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asm-testcase.tar.gz
Type: application/x-tgz
Size: 1224 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081017/18451e3f/attachment.bin>
-------------- next part --------------
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Linux)

# which C and C++ compiler to use
SET(CMAKE_C_COMPILER   /opt/eldk-4.1/ppc_4xxFP/usr/bin/ppc_4xxFP-gcc )
SET(CMAKE_CXX_COMPILER /opt/eldk-4.1/ppc_4xxFP/usr/bin/ppc_4xxFP-g++ )

# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH  /opt/eldk-4.1/ppc_4xxFP/ppc_4xxFP /home/alex/eldk-ppc-extra-install )

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search 
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


More information about the CMake mailing list