Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# git -C repos clone https://github.com/llvm/llvm-project.git
# git -C repos/llvm-project am -k $PWD/patches/llvm-project/*.patch
# git -C repos clone https://github.com/picolibc/picolibc.git
# git -C repos/picolibc apply $PWD/patches/picolibc.patch
# git -C repos/picolibc apply $PWD/patches/picolibc/*.patch
# mkdir build
# cd build
# cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc
Expand Down Expand Up @@ -289,6 +289,11 @@ set(LLVM_PATCH_COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/p
if(APPLY_LLVM_PERFORMANCE_PATCHES)
set(LLVM_PATCH_COMMAND ${LLVM_PATCH_COMMAND} && ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patch_llvm.py ${CMAKE_CURRENT_SOURCE_DIR}/patches/llvm-project-perf)
endif()
set(
picolibc_patches
${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0001-Enable-libcxx-builds.patch
${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch
)

FetchContent_Declare(llvmproject
GIT_REPOSITORY https://github.com/llvm/llvm-project.git
Expand All @@ -308,7 +313,7 @@ FetchContent_Declare(picolibc
GIT_TAG "${picolibc_TAG}"
GIT_SHALLOW "${picolibc_SHALLOW}"
GIT_PROGRESS TRUE
PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${CMAKE_CURRENT_SOURCE_DIR}/patches/picolibc.patch
PATCH_COMMAND git reset --quiet --hard && git clean --quiet --force -dx && git apply ${picolibc_patches}
# We only want to download the content, not configure it at this
# stage. picolibc will be built in many configurations using
# ExternalProject_Add using the sources that are checked out here.
Expand Down
2 changes: 1 addition & 1 deletion docs/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mkdir repos
git -C repos clone https://github.com/llvm/llvm-project.git
git -C repos/llvm-project am -k "$PWD"/patches/llvm-project/*.patch
git -C repos clone https://github.com/picolibc/picolibc.git
git -C repos/picolibc apply "$PWD"/patches/picolibc.patch
git -C repos/picolibc apply "$PWD"/patches/picolibc/*.patch
mkdir build
cd build
cmake .. -GNinja -DFETCHCONTENT_SOURCE_DIR_LLVMPROJECT=../repos/llvm-project -DFETCHCONTENT_SOURCE_DIR_PICOLIBC=../repos/picolibc
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
From 42f07bef7775a1387f9707e959f8b6782f9d6808 Mon Sep 17 00:00:00 2001
From: Simi Pallipurath <[email protected]>
Date: Thu, 14 Nov 2024 10:07:08 +0000
Subject: [PATCH 1/2] [PATCH 1/2] Enable libcxx builds

Modifications to build config and linker script required to enable
libc++ builds.
---
meson.build | 12 ++++++++++++
picolibc.ld.in | 3 +++
2 files changed, 15 insertions(+)

diff --git a/meson.build b/meson.build
index f90f5b818..2f8d63733 100644
index 012d664bd..4161d6574 100644
--- a/meson.build
+++ b/meson.build
@@ -1310,6 +1310,18 @@ if get_option('newlib-retargetable-locking') != get_option('newlib-multithread')
@@ -1318,6 +1318,18 @@ if get_option('newlib-retargetable-locking') != get_option('newlib-multithread')
error('newlib-retargetable-locking and newlib-multithread must be set to the same value')
endif

Expand Down
Loading
Loading