<div dir="ltr"><div>Hi Thibault,<br><br></div>Can you post your toolchain file?<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">- Chuck<br></div></div></div>
<br><div class="gmail_quote">On Tue, Feb 9, 2016 at 9:10 AM, Thibault Genessay <span dir="ltr"><<a href="mailto:tibogens@gmail.com" target="_blank">tibogens@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br>I'm a long time user of CMake (and huge fan of it) but newly registered on this list, so please forgive me if I have missed something regarding the new 3.5 series.<br><br></div><div>I use CMake with the GCC ARM Embedded compiler (<a href="https://launchpad.net/gcc-arm-embedded" target="_blank">https://launchpad.net/gcc-arm-embedded</a>) to cross-compile my project (Windows host, STM32 target, MinGW binutils). Like many users (all?) I had to create a toolchain file because CMake doesn't support this compiler/setup out of the box. I have taken inspiration from the many Google hits and had a working setup until 3.5. This setup relied on the CMAKE_FORCE_<lang>_COMPILER macros.<br><br></div><div>I installed 3.5 and the build broke, CMake complaining that this macro was deprecated and should not be used because of the many improvements on the compiler detection side. OK, so I removed the offending lines, simply setting the CMAKE_C_COMPILER variable to the compiler's executable ... and suddenly I remember why I did use this FORCE hack in the first place: CMake tells me my compiler is broken because it cannot compile a test program (undefined symbol: _exit). This is somehow correct, as I compile for bare metal and I am providing the _exit function in my code. This is a misunderstanding the CMAKE_FORCE_C_COMPILER works around by simply saying "believe me, this compiler works".<br><br></div><div>Now I am left without many options: I can't use the FORCE hack, and I can't convince CMake my compiler is OK. I am very open to redesign my toolchain file, or use a stock one from CMake, or whatever this takes, but I simply do not know how to proceed. Actually, I feel my current toolchain file, although functional, is not "clean" but never had enough time to do it. Now that it's a blocking issue, I do have time :)<br><br></div><div>I rolled back to 3.4 and things work so I'm safe for now. But I would be very glad if somebody knew more about this specific problem, or this compiler, or toolchain file writing in general. I would love to write a "stock" toolchain file for this compiler but I simply do not know enough (nor I can find enough up-to-date documentation).<br><br></div><div>Thanks for reading,<br></div><div>Cheers<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Thibault<br></div><div><br><br></div><br></font></span></div><br></div>
<br>--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br></blockquote></div><br></div>