<div dir="ltr">I'm working on a cross-compiling project for the STM32F4 arm processor and on my Fedora 28 system everything is working fine (cmake 3.11.2) but others trying to configure are running into problems with the compiler check failing.<div><br></div><div>Since I'm cross-compiling as far as I know I need "--specs=nosys.specs" flag added for the compiler check to work which it is for me (relevant output from CMakeOutput.log):</div><div><br></div><div><div>Building C object CMakeFiles/cmTC_2ac2b.dir/testCCompiler.c.o</div><div>/usr/lib64/ccache/arm-none-eabi-gcc -Wall -std=gnu11 -mlittle-endian -mthumb -mthumb-interwork -nostartfiles -mcpu=cortex-m4 -fsingle-precision-constant -Wdouble-promotion -mfpu=fpv4-sp-d16 -mfloat-abi=hard -D__FPU_PRESENT=1 -D__FPU_USED=1 --specs=nosys.specs -o CMakeFiles/cmTC_2ac2b.dir/testCCompiler.c.o -c /home/build/build/stm32/CMakeFiles/CMakeTmp/testCCompiler.c</div></div><div><br></div><div>But others have no flags being applied (cmake 3.9.1 on Ubuntu):</div><div><br></div><div>
<div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><div>Building C object CMakeFiles/cmTC_01cf5.dir/testCCompiler.c.obj</div><div>/usr/bin/arm-none-eabi-gcc -o CMakeFiles/cmTC_01cf5.dir/testCCompiler.c.obj -c /home/david/codec2-dev/build_stm32b/CMakeFiles/CMakeTmp/testCCompiler.c</div></div><br class="gmail-Apple-interchange-newline">
What is the right way to make sure flags are passed to the compiler check?</div><div><br></div><div>I assume I could use CMakeForceCompiler but that seems like a last resort...</div><div><br></div><div>Thanks,</div><div>Richard</div></div>