[cmake-developers] Green Hills MULTI Generator Recommendations

Chris Bux chrisbux at gmail.com
Sat Jul 2 14:21:31 EDT 2016


I am interested in using CMake with Green Hills MULTI.  I see that there is
some experimental support for MULTI in CMake already, but that support
appears to be tied to ARM and assumes the Green Hills INTEGRITY RTOS is
also being used.  I would also like to build for the x86 and Renesas V850
architectures.

I have hacked in support for other targets just to get something working
locally, but I could use some recommendations on how to proceed so I can
submit patches to the CMake project.

I have a couple of questions.

1. GHS MULTI supports multiple processor architectures, but each of the
architectures use different compiler/linker names.  As an example, ARM uses
ccarm/cxarm but the v850 uses ccv850/cxv850.  Should the MULTI generator
provide a list of known compiler names by architecture, or should we rely
on users to set the appropriate CMAKE_<LANG>_COMPILER variables in the
toolchain file? If the generator should provide a list of known compiler
names, would CMake's -A option be the appropriate way to specify the target
processor's platform?  Is there another compiler toolchain that might be a
good template to copy from?

2. Is there a way in a toolchain file or on the command line to specify the
directory where CMake should look for the compiler executables?  I tried
creating a variable in a toolchain file, but it appears that CMake tries to
figure out the CMAKE_<LANG>_COMPILER value before the toolchain variable I
created is available.

3. Is there a way to specify the make executable full path in the toolchain
file?  GHS MULTI uses their own program called gbuild to drive their
builds.  At least for our team, it would not be a good idea for us to put
the gbuild executable in the PATH variable because we will be working with
more than one architecture and we would need to specify exactly which
gbuild executable to use - we wouldn't want the ARM gbuild to run when we
are building for x86.  I tried setting CMAKE_MAKE_PROGRAM in the toolchain
file, but the CMAKE_MAKE_PROGRAM variable I set in the toolchain file does
not appear to be available at the time FindMakeProgram() in the generator
is called.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160702/96341d07/attachment.html>


More information about the cmake-developers mailing list