summaryrefslogtreecommitdiff
path: root/external/nss
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-10-01 12:57:53 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-10-02 13:38:10 +0200
commitd2f9c55e065d559de903d540da28502646714a24 (patch)
tree819d80ca607c2ef9ee3666fc71d1eacddf8c1cf7 /external/nss
parent597a746b38c4b3cb860cc997d532029d56a9f75a (diff)
nss: restore manual pre-dependency build
We had some seldom build failures on Windows, with errors like: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '..../nssckmdt.h'. This happens, because of the "." / parent shell hack. Thinking about it again, it doesn't prevent the parent make to run in parallel to the "." directory make. So I tried to use a terminal match-all rule like ifneq (,$(filter .,$(DIRS))) %:: # empty terminal rule triggered $(error can't happen) endif to stop the original parent make, but that doesn't work and the $(error ...) is triggered. So AFAIK I'm out of options here and have to restore the old manual pre-dependency build variant - still much better then no parallel build. An alternative idea was to put the rest of the rules.mk in the "else" of the terminal rule, to skip all normal rules, but this still leaves out all rules from the rest of the make-files, which might result in some hard to debug errors. This reverts my upstream patch 15608:744881490c78. Change-Id: I9e2e9e1ec9f35697c7853c92f60434f514cba5ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103777 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'external/nss')
-rw-r--r--external/nss/ExternalProject_nss.mk1
-rw-r--r--external/nss/UnpackedTarball_nss.mk1
-rw-r--r--external/nss/nss-android.patch.16
-rw-r--r--external/nss/nss-restore-manual-pre-dependencies.patch.183
4 files changed, 86 insertions, 5 deletions
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index a7099e34e7e7..25d4995ced44 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -59,7 +59,6 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)") \
NSDISTMODE=copy \
$(MAKE) \
- -j1 \
AR="$(AR)" \
RANLIB="$(RANLIB)" \
NMEDIT="$(NM)edit" \
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 7921d36078bf..fb8b8b061265 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/macos-dlopen.patch.0 \
external/nss/nss.getopt.patch.0 \
external/nss/nss-win-arm64.patch \
+ external/nss/nss-restore-manual-pre-dependencies.patch.1 \
$(if $(filter iOS,$(OS)), \
external/nss/nss-ios.patch) \
$(if $(filter ANDROID,$(OS)), \
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index 7d3807f73589..0f75715e8b86 100644
--- a/external/nss/nss-android.patch.1
+++ b/external/nss/nss-android.patch.1
@@ -62,13 +62,11 @@ diff -ur nss.org/nss/Makefile nss/nss/Makefile
$(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install
--- nss/nss/lib/ckfw/builtins/manifest.mn.orig 2019-11-26 15:18:22.185985193 +0100
+++ nss/nss/lib/ckfw/builtins/manifest.mn 2019-11-26 15:18:29.281982387 +0100
-@@ -5,9 +5,7 @@
+@@ -5,7 +5,7 @@
CORE_DEPTH = ../../..
--DIRS = . testlib
--
--testlib: .
+-DIRS = testlib
+DIRS =
MODULE = nss
diff --git a/external/nss/nss-restore-manual-pre-dependencies.patch.1 b/external/nss/nss-restore-manual-pre-dependencies.patch.1
new file mode 100644
index 000000000000..ebcc5b48c540
--- /dev/null
+++ b/external/nss/nss-restore-manual-pre-dependencies.patch.1
@@ -0,0 +1,83 @@
+Revert of upstream:
+
+changeset: 15608:744881490c78
+user: Jan-Marek Glogowski <glogow@fbihome.de>
+date: Wed May 13 19:00:40 2020 +0000
+summary: Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
+
+--- b/nss/coreconf/rules.mk Wed May 13 19:00:40 2020 +0000
++++ a/nss/coreconf/rules.mk Tue May 12 21:33:43 2020 +0000
+@@ -31,21 +31,10 @@
+ USE_NT_C_SYNTAX=1
+ endif
+
+-# For whatever reason, "." can't be handled using make conditionals.
+-# Based on automake's SUBDIRS "." handling.
+ ifdef DIRS
+ ifndef IGNORE_DIRS
+-ifneq (,$(filter .,$(DIRS)))
+-TARGETS = $(NULL)
+-ALL_TRASH = $(NULL)
+-endif
+-
+ $(DIRS):
++ $(IGNORE_ERROR)@$(MAKE) -C $@ $(MAKECMDGOALS)
+- $(IGNORE_ERROR)@if [ "$@" != "." ]; then \
+- $(MAKE) -C $@ $(MAKECMDGOALS) ; \
+- else \
+- IGNORE_DIRS=1 $(MAKE) -C $@ $(MAKECMDGOALS) ; \
+- fi
+ @$(CLICK_STOPWATCH)
+ endif
+ endif
+@@ -84,9 +73,7 @@
+ check: $(DIRS)
+
+ clean clobber: $(DIRS)
+-ifneq (,$(ALL_TRASH))
+ rm -rf $(ALL_TRASH)
+-endif
+
+ realclean clobber_all: $(DIRS)
+ rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
+--- b/nss/lib/ckfw/builtins/manifest.mn Wed May 13 19:00:40 2020 +0000
++++ a/nss/lib/ckfw/builtins/manifest.mn Tue May 12 21:33:43 2020 +0000
+@@ -5,9 +5,7 @@
+
+ CORE_DEPTH = ../../..
+
++DIRS = testlib
+-DIRS = . testlib
+-
+-testlib: .
+
+ MODULE = nss
+
+--- b/nss/lib/ckfw/manifest.mn Wed May 13 19:00:40 2020 +0000
++++ a/nss/lib/ckfw/manifest.mn Tue May 12 21:33:43 2020 +0000
+@@ -5,9 +5,7 @@
+
+ CORE_DEPTH = ../..
+
++DIRS = builtins
+-DIRS = . builtins
+-
+-builtins: .
+
+ PRIVATE_EXPORTS = \
+ ck.h \
+--- b/nss/manifest.mn Wed May 13 19:00:40 2020 +0000
++++ a/nss/manifest.mn Tue May 12 21:33:43 2020 +0000
+@@ -23,6 +23,12 @@
+ # no real way to encode these in any sensible way
+ $(MAKE) -C coreconf/nsinstall program
+ $(MAKE) export
++ # pre-build child dir -> parent dir dependencies
++ # ckfw/builtins -> ckfw
++ IGNORE_DIRS=1 $(MAKE) -C lib/ckfw libs
++ # ckfw/builtins/testlib -> ckfw/builtins + base
++ $(MAKE) -C lib/base libs
++ IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins libs
+
+ all: prepare_build
+ $(MAKE) libs