[cmake-developers] [CMake 0012614]: Support for RVDS 4.1: ARM C/C++ and ASM compilers.

Mantis Bug Tracker mantis at public.kitware.com
Fri Dec 9 03:18:43 EST 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=12614 
====================================================================== 
Reported By:                Abdelrazak Younes
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   12614
Category:                   Modules
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2011-12-09 03:18 EST
Last Modified:              2011-12-09 03:18 EST
====================================================================== 
Summary:                    Support for RVDS 4.1: ARM C/C++ and ASM compilers.
Description: 
What works:

* The ASM compilation works just fine, except for <FLAGS>, we don’t know how
to use that so we just hardcoded the flags in the CMakeASM-RVDSInformation.cmake
file.

* The C and C++ compilation and static libraries generation work with one
caveat: we hardcoded “armar” in CMAKE_C_CREATE_STATIC_LIBRARY and
CMAKE_CXX_CREATE_STATIC_LIBRARY because setting CMAKE_AR doesn’t work for us.

What doesn’t work:

* We cannot use armcc for linking because we need to  use a scatter file for
memory and this requires using armlink. Unfortunately, setting
CMAKE_CXX_LINK_EXECUTABLE doesn’t work for us because:
1) we did not find how to set the arguments of armlink correctly
2) armlink requires an object file as first input, giving only static libraries
doesn’t work

So, as a workaround, we install our static libraries in a dedicated
“archive” folder and we use a build script for the final linking step thanks
to a custom target:

  file(GLOB archives ${CMAKE_BINARY_DIR}/archive/*.a)

  add_custom_target(fw ${CMAKE_SOURCE_DIR}/../cmake/link.sh ${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}
                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/archive)

I also attach our build script for reference.

This works for us but obviously is far from optimal. So we are contributing this
in the hope that it is useful to you and also that it can be improved. If some
CMake developer can help us improve this, we would be happy to test and help of
course.


Additional Information: 
Contribution of MARVELL Switzerland SARL

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-12-09 03:18 Abdelrazak YounesNew Issue                                    
2011-12-09 03:18 Abdelrazak YounesFile Added: cmake-RVDS.zip                    
======================================================================




More information about the cmake-developers mailing list