[CMake] Cygwin DS-5 Arm Cross-compiling and how to get past Compiler Check error w/ Absolute path

Jimi Damon jdamon at accesio.com
Wed Mar 21 17:16:35 EDT 2018


Hi,

I have an issue running the 16.1  DS-5  Arm compiler tool suite that is
based around the GNU arm embedded toolchain.

The problem is that these compilers cannot process the Cygwin path
structure ( Ie /cygdrive/c/....path/to/file ).

I have a build that works perfectly under Linux using CMake and a
CMAKE_TOOLCHAIN_FILE using this same DS-5 compiler build for Linux.
The problem is that my teammates develop under Cygwin and I wanted to port
this build (hence the reason for Cmake ) to Cygwin.



1. The first problem I have is that when I try to run
cmake  -DCMAKE_TOOLCHAIN_FILE=../../Toolchain-arm.cmake  ..


Is that Cmake tries to run testCCompiler.cc , but it uses the Cygwin
absolute path to this file and fails.

As a result my compiler errors out saying


/cygdrive/c/intelFPGA/16.1/embedded/ds-5/sw/gcc/bin/arm-linux-gnueabihf-gcc
  -o CMakeFiles/cmTC_05821.dir/testCCompiler.c.obj -c

/home/JDamon/device-mcb-apps/mavcore/build/CMakeFiles/CMakeTmp/testCCompiler.c


  arm-linux-gnueabihf-gcc.exe: error:

/home/JDamon/device-mcb-apps/mavcore/build/CMakeFiles/CMakeTmp/testCCompiler.c:
  No such file or directory  #< This is the indicator that it doesn't like
Cygwin paths.


You can verify this very easily just by creating a simple hello_world.c and
run the compiler with the absolute path to that file.



How can I get past this compiler check ?



2. Is there a way to force Cmake to use relative file names or Native file
names  ( something like TO_NATIVE_PATH ) when when performing the regular
compilation ? I ask this because I already ran into the problem porting the
manual Makefile from Linux to Cygwin and  expressions like   $(CC)
-I/absolute/path/to/file  ( rest of the line )  all failed because the
compiler cannot handle the Cygwin paths.



Thanks,

-Jimi
--

-- 
WARNING - This e-mail or its attachments may contain controlled technical 
data or controlled technology within the definition of the International 
Traffic in Arms Regulations (ITAR) or Export Administration Regulations 
(EAR), and are subject to the export control laws of the U.S. Government. 
Transfer of this data or technology by any means to a foreign person, 
whether in the United States or abroad, without an export license or other 
approval from the U.S. Government, is prohibited. The information contained 
in this document is CONFIDENTIAL and property of ACCES I/O Products, Inc. 
Any unauthorized review, use, disclosure or distribution is prohibited 
without express written consent of ACCES I/O Products, Inc. If you are not 
the intended recipient, please contact the sender and destroy all copies of 
the original message and enclosed attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180321/a35a9508/attachment.html>


More information about the CMake mailing list