[CMake] Assembler handling in 2.8.5 vs 2.8.4

Alexander Neundorf a.neundorf-work at gmx.net
Fri Jul 29 11:24:32 EDT 2011


On Friday 29 July 2011, Florian Reinhard wrote:
> Yay! Native support for cl6x TI compiler! :)
> 
> 2011/7/22 Alexander Neundorf <a.neundorf-work at gmx.net>:
> > Can you build cmake from this branch I just created ?
> > http://cmake.org/gitweb?p=stage/cmake.git;a=shortlog;h=refs/heads/TI_DSP_
> > Compiler
> 
> Tested and failed:
> #cmake --version
> cmake version 2.8.5.20110722
> 
> #cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=release ..
> -- Archiver: c:/tools/cgtools-7.2.4/bin/ar6x.exe
> -- The C compiler identification is TI_DSP
> -- The CXX compiler identification is TI_DSP
> -- Check for working C compiler: c:/tools/cgtools-7.2.4/bin/cl6x.exe
> terminate called after throwing an instance of 'std::logic_error'
>   what():  basic_string::_S_construct NULL not valid

Can you maybe run it in a debugger so we can get a backtrace ?
 
> This application has requested the Runtime to terminate it in an unusual
> way. Please contact the application's support team for more information.
> 
> > It has basic support for the TI compiler, see the files
> > Modules/Compiler/TI_DSP-*.cmake.
> > 
> > At least I was able to compile and link C, C++ and an assembler file.
> > 
> > It should also work to copy these three files simply in the
> > Modules/Compiler/ directory of your installed cmake, but you need at
> > least CMake 2.8.4.
> 
> Tested with 2.8.5, fails as well in the same way. I guess because it
> comliles something and tries to execute it?

No, most probably not.
At that point, cmake compiles and links a few files, but does not try to run 
them. It only tries to extract strings from them.
 
> I had to disable some tests to get rid of the crash:
> SET (CMAKE_C_COMPILER_WORKS   1)
> SET (CMAKE_CXX_COMPILER_WORKS 1)
> SET (CMAKE_DETERMINE_C_ABI_COMPILED   1)
> SET (CMAKE_DETERMINE_CXX_ABI_COMPILED 1)
> SET (CMAKE_DETERMINE_ASM_ABI_COMPILED 1)


This shouldn't be necessary, and it was working for me without it (under 
Linux).


> Thatway ENABLE_LANGUAGE (ASM) did work.
> 
> > I'm quite sure these files are not complete.
> > Please give them a try and I'd be happy about patches to make them really
> > work.
> 
> Here's what i've found:
> Having <OBJECTS> as first argument didn't work for me, putting them at
> the end of the list made my project link.
> set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> --run_linker
> --output_file=<TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS>
> <LINK_LIBRARIES> <OBJECTS>")
> 
> Running on windows the output file extension is by default .exe which
> doesn't make sense, since there will be probably nobody compiling for
> the C6000 family on a C6000 system. So i guess having this would make
> sense:
> SET (CMAKE_EXECUTABLE_SUFFIX    .out)

This depends also on your target operating system. For which OS are you 
developing ?

> Thank you again and I'll spend more time on testing next week. If you
> need to i'd provide patches on a clone on github.

Yes, that'd be good.

Alex

P.S. please keep the mailing list on CC


More information about the CMake mailing list