[libc-commits] [PATCH] D124214: [libc][NOT FOR COMMIT] building LLVM-libc on 32 bit arm with gcc

Peter Smith via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Apr 28 03:25:08 PDT 2022


peter.smith added a comment.

Thanks very much for posting the patch. Just curious to know whether you've tried building with Clang? Is using GCC due to it having a default target of Arm? If I get some time I'll try to see if I can get it work with the https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm this approximates some of the multilib and specs files with clang config files, although we're hoping to add better support for multilib.



================
Comment at: libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake:15
 
+set(LIBC_COMPILE_OPTIONS_NATIVE -mcpu=cortex-m4 -mabi=aapcs -mthumb)
+
----------------
For Cortex-m4 strictly speaking you shouldn't need the -mabi=aapcs the GNU embedded toolchain will default to that, the same for -mthumb as Cortex-m4 only supports Thumb.

Although as you say, this is an experimental patch so no harm done at this point.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124214/new/

https://reviews.llvm.org/D124214



More information about the libc-commits mailing list