<div dir="ltr"><div>Hello everyone,</div><div><br></div><div>So here's my situation - I am running an RTOS on an embedded system with an ARM Cortex M7. I have a freestanding GCC toolchain built for this target.  What I would like to do is cross-compile LLVM to produce only the static runtime libraries: libcxxabi, libcxx, compiler-rt, and libunwind using that toolchain.<br></div><div><br></div><div>Here is my attempt to configure LLVM to get what I want:</div><div><br></div><div>```<br></div><div>#!/bin/bash<br>  <br>mkdir build-arm<br>cd build-arm<br><br>cmake -DCMAKE_TOOLCHAIN_FILE=../arm-toolchain.cmake \<br>    -DCMAKE_CROSSCOMPILING=True \<br>    -DCMAKE_INSTALL_PREFIX=output \<br>    -DLLVM_TABLEGEN=../build-host/bin/llvm-tblgen \<br>    -DCLANG_TABLEGEN=../build-host/bin/clang-tblgen \<br>    -DLLVM_DEFAULT_TARGET_TRIPLE=arm-none-eabi \<br>    -DLLVM_TARGET_ARCH=ARM \<br>    -DLLVM_TARGETS_TO_BUILD=ARM \<br>    -DLLVM_BUILD_STATIC=True \<br>    -DLLVM_ENABLE_PROJECTS="compiler-rt;libcxx;libcxxabi;libunwind" ../llvm</div><div>```</div><div><br></div><div>However, this results in the following error:</div><div><br></div><div>``` <br>CMake Error at cmake/modules/CheckAtomic.cmake:56 (message):<br>  Host compiler must support std::atomic!<br>Call Stack (most recent call first):<br>  cmake/config-ix.cmake:364 (include)<br>  CMakeLists.txt:681 (include)<br></div><div>```</div><div><br></div><div>Is what I'm trying to do supported? Could someone help me chip away at this? I'm really trying to get a full LLVM stack running on this thing!<br></div><div><br></div><div>Any help would be appreciated!</div><div><br></div><div>Best,</div><div>Anthony<br></div><div><div><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><div><table style="font-family:"Times New Roman";width:470px" width="470" cellspacing="0" cellpadding="0" border="0"><tbody><tr valign="top"><td style="padding-left:10px;width:10px;padding-right:10px"><br></td><td style="border-right:1px solid rgb(0,114,177)"><br></td><td style="text-align:initial;font-stretch:normal;font-size:14px;line-height:normal;font-family:Arial;color:rgb(100,100,100);padding:0px 10px"><br></td></tr></tbody></table></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>