From e636f9b068d78f81b2e0b502c0d296c2acb95798 Mon Sep 17 00:00:00 2001
From: Erik Karlsson <erik.karlsson@genexis.eu>
Date: Thu, 25 Feb 2021 23:43:11 +0100
Subject: [PATCH] nss: fix parallel build

There is a hack for building subdirectories before the parent
directory. There is a bug in this which causes the EXPORTS and
PRIVATE_EXPORTS targets to be built twice leading to a race condition.

Change-Id: I94230722671aa6c0c10afdfe376bbb3fa86d109f
---
 libs/nss/patches/004-fix_parallel_build.patch | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 libs/nss/patches/004-fix_parallel_build.patch

diff --git a/libs/nss/patches/004-fix_parallel_build.patch b/libs/nss/patches/004-fix_parallel_build.patch
new file mode 100644
index 0000000000..365fd91de4
--- /dev/null
+++ b/libs/nss/patches/004-fix_parallel_build.patch
@@ -0,0 +1,22 @@
+diff --git a/coreconf/rules.mk b/coreconf/rules.mk
+index dc72e9cef..fe7acc45d 100644
+--- a/nss/coreconf/rules.mk
++++ b/nss/coreconf/rules.mk
+@@ -38,6 +38,8 @@ ifndef IGNORE_DIRS
+ ifneq (,$(filter .,$(DIRS)))
+ TARGETS = $(NULL)
+ ALL_TRASH = $(NULL)
++EXPORTS = $(NULL)
++PRIVATE_EXPORTS = $(NULL)
+ endif
+ 
+ $(DIRS):
+@@ -52,6 +54,8 @@ endif
+ 
+ export: $(DIRS) private_export
+ 
++private_export: $(DIRS)
++
+ release_export: $(DIRS)
+ 
+ libs program install: $(DIRS) $(TARGETS)
-- 
GitLab