summaryrefslogtreecommitdiff
path: root/build-aux/picolibc/CMakeLists.txt
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-04 12:47:28 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-04 12:47:28 -0700
commit165130ef99822ab7c8a8765e7f593522b9faa925 (patch)
tree2bb00d89d9a80cb0f8369965cc60a1a0d8b38bb2 /build-aux/picolibc/CMakeLists.txt
parent29f9994856f1f56c40e9c54ec5e8f29ba8d3387e (diff)
wip picolibclukeshu/picolibc
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
+)