summaryrefslogtreecommitdiff
path: root/build-aux/picolibc/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/picolibc/CMakeLists.txt')
-rw-r--r--build-aux/picolibc/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/build-aux/picolibc/CMakeLists.txt b/build-aux/picolibc/CMakeLists.txt
new file mode 100644
index 0000000..e67347c
--- /dev/null
+++ b/build-aux/picolibc/CMakeLists.txt
@@ -0,0 +1,23 @@
+# https://github.com/picolibc/picolibc/issues/696
+
+include(ExternalProject)
+
+ExternalProject_Add(picolibc
+ PREFIX "${CMAKE_CURRENT_BINARY_DIR}"
+ SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rd-party/picolibc"
+ CONFIGURE_COMMAND meson setup \
+ --cross-file "${CMAKE_CURRENT_SOURCE_DIR}/cross-cortex-m0-none-eabi.txt" \
+ -Dc_args=-funwind-tables \
+ -Dc_args=-mpoke-function-name \
+ -Dmultilib=false \
+ -Dprefix="${CMAKE_CURRENT_BINARY_DIR}" \
+ -Dincludedir=arm-none-eabi/include \
+ -Dlibdir=arm-none-eabi/lib \
+ -Dspecsdir=arm-none-eabi/lib \
+ "${CMAKE_SOURCE_DIR}/3rd-party/picolibc"
+ BUILD_COMMAND ninja
+ INSTALL_COMMAND ninja install
+ LOG_CONFIGURE false
+ LOG_BUILD false
+ LOG_INSTALL false
+)