| From aca9f9ae26235e9da2bc9adef49f9f5578f3e1e7 Mon Sep 17 00:00:00 2001 |
| From: Gyorgy Szing <Gyorgy.Szing@arm.com> |
| Date: Tue, 25 Apr 2023 15:03:46 +0000 |
| Subject: [PATCH 1/1] Limit nanopb build to single process |
| |
| Sometimes in yocto the nanopb build step fails. The reason seems |
| to be a race condition. This fix disables parallel build as |
| a workaround. |
| |
| Upstream-Status: Inappropriate [yocto specific] |
| |
| Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> |
| --- |
| external/nanopb/nanopb.cmake | 4 ++++ |
| 1 file changed, 4 insertions(+) |
| |
| diff --git a/external/nanopb/nanopb.cmake b/external/nanopb/nanopb.cmake |
| index 36465f61..94f8048c 100644 |
| --- a/external/nanopb/nanopb.cmake |
| +++ b/external/nanopb/nanopb.cmake |
| @@ -65,6 +65,8 @@ if(TARGET stdlib::c) |
| unset_saved_properties(LIBC) |
| endif() |
| |
| +set(_PROCESSOR_COUNT ${PROCESSOR_COUNT}) |
| +set(PROCESSOR_COUNT 1) |
| include(${TS_ROOT}/tools/cmake/common/LazyFetch.cmake REQUIRED) |
| LazyFetch_MakeAvailable(DEP_NAME nanopb |
| FETCH_OPTIONS ${GIT_OPTIONS} |
| @@ -73,6 +75,8 @@ LazyFetch_MakeAvailable(DEP_NAME nanopb |
| CACHE_FILE "${TS_ROOT}/external/nanopb/nanopb-init-cache.cmake.in" |
| SOURCE_DIR "${NANOPB_SOURCE_DIR}" |
| ) |
| +set(PROCESSOR_COUNT ${_PROCESSOR_COUNT}) |
| + |
| unset(_cmake_fragment) |
| |
| if(TARGET stdlib::c) |
| -- |
| 2.34.1 |
| |