[50/50] Config: Disable parallel builds for Cargo on riscv64

Message ID 20220222125135.1211290-51-michael.tremer@ipfire.org
State Accepted
Commit 9b1f666eae381924b1b3bc1666cadc9ef3320955
Headers
Series [01/50] expat: Update to version 2.4.6 - Security/CVE fixes |

Commit Message

Michael Tremer Feb. 22, 2022, 12:51 p.m. UTC
  There seems to be some problem where Cargo deadlocks during the build
when running on mutliple cores simulteneously.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 lfs/Config | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Comments

Michael Tremer Feb. 22, 2022, 12:54 p.m. UTC | #1
Whoops. I fucked this up.

My next branch wasn’t up to date on this system and so I sent more patches than I should have.

Could you please ignore the patches that are already in next and just merge the rest?

-Michael

> On 22 Feb 2022, at 12:51, Michael Tremer <michael.tremer@ipfire.org> wrote:
> 
> There seems to be some problem where Cargo deadlocks during the build
> when running on mutliple cores simulteneously.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
> lfs/Config | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lfs/Config b/lfs/Config
> index 9309b832d..53f31ed63 100644
> --- a/lfs/Config
> +++ b/lfs/Config
> @@ -209,9 +209,15 @@ CARGO = \
> 	--offline
> 
> CARGO_OPTIONS = \
> -	$(MAKETUNING) \
> 	-Z avoid-dev-deps
> 
> +# Cargo dealocks on riscv64 when building on multiple cores at the same time
> +ifeq "$(BUILD_ARCH)" "riscv64"
> +	CARGO_OPTIONS += -j1
> +else
> +	CARGO_OPTIONS += $(MAKETUNING)
> +endif
> +
> define CARGO_PREPARE
> 	mkdir -p $(CARGO_PATH) && \
> 	echo "$${CARGO_CONFIG}" > $(CARGO_PATH)/config && \
> -- 
> 2.30.2
>
  

Patch

diff --git a/lfs/Config b/lfs/Config
index 9309b832d..53f31ed63 100644
--- a/lfs/Config
+++ b/lfs/Config
@@ -209,9 +209,15 @@  CARGO = \
 	--offline
 
 CARGO_OPTIONS = \
-	$(MAKETUNING) \
 	-Z avoid-dev-deps
 
+# Cargo dealocks on riscv64 when building on multiple cores at the same time
+ifeq "$(BUILD_ARCH)" "riscv64"
+	CARGO_OPTIONS += -j1
+else
+	CARGO_OPTIONS += $(MAKETUNING)
+endif
+
 define CARGO_PREPARE
 	mkdir -p $(CARGO_PATH) && \
 	echo "$${CARGO_CONFIG}" > $(CARGO_PATH)/config && \