diff options
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/parallel.patch')
| -rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq/parallel.patch | 172 |
1 files changed, 96 insertions, 76 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/parallel.patch b/recipes-connectivity/openssl/openssl-qoriq/parallel.patch index f3f4c9988..f4b8ef6c1 100644 --- a/recipes-connectivity/openssl/openssl-qoriq/parallel.patch +++ b/recipes-connectivity/openssl/openssl-qoriq/parallel.patch | |||
| @@ -1,17 +1,83 @@ | |||
| 1 | Fix the parallel races in the Makefiles. | 1 | From ca1f18b71005c199059870a5772fb88e5449cbae Mon Sep 17 00:00:00 2001 |
| 2 | From: Chunrong Guo <chunrong.guo@nxp.com> | ||
| 3 | Date: Tue, 20 Mar 2018 13:51:15 +0800 | ||
| 4 | Subject: [PATCH] Fix the parallel races in the Makefiles. | ||
| 2 | 5 | ||
| 3 | This patch was taken from the Gentoo packaging: | 6 | This patch was taken from the Gentoo packaging: |
| 4 | https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2g-parallel-build.patch | 7 | https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2g-parallel-build.patch |
| 5 | 8 | ||
| 6 | Upstream-Status: Pending | 9 | Upstream-Status: Pending |
| 7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 10 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 11 | --- | ||
| 12 | Makefile.org | 14 ++++----- | ||
| 13 | Makefile.shared | 2 ++ | ||
| 14 | crypto/Makefile | 10 +++--- | ||
| 15 | engines/Makefile | 6 ++-- | ||
| 16 | test/Makefile | 92 ++++++++++++++++++++++++++++---------------------------- | ||
| 17 | 5 files changed, 63 insertions(+), 61 deletions(-) | ||
| 8 | 18 | ||
| 9 | Refreshed for 1.0.2i | 19 | diff --git a/Makefile.org b/Makefile.org |
| 10 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | 20 | index 9f24777..61fc488 100644 |
| 11 | 21 | --- a/Makefile.org | |
| 12 | --- openssl-1.0.2g/crypto/Makefile | 22 | +++ b/Makefile.org |
| 13 | +++ openssl-1.0.2g/crypto/Makefile | 23 | @@ -283,17 +283,17 @@ build_libcrypto: build_crypto build_engines libcrypto.pc |
| 14 | @@ -85,11 +85,11 @@ | 24 | build_libssl: build_ssl libssl.pc |
| 25 | |||
| 26 | build_crypto: | ||
| 27 | - @dir=crypto; target=all; $(BUILD_ONE_CMD) | ||
| 28 | + +@dir=crypto; target=all; $(BUILD_ONE_CMD) | ||
| 29 | build_ssl: build_crypto | ||
| 30 | - @dir=ssl; target=all; $(BUILD_ONE_CMD) | ||
| 31 | + +@dir=ssl; target=all; $(BUILD_ONE_CMD) | ||
| 32 | build_engines: build_crypto | ||
| 33 | - @dir=engines; target=all; $(BUILD_ONE_CMD) | ||
| 34 | + +@dir=engines; target=all; $(BUILD_ONE_CMD) | ||
| 35 | build_apps: build_libs | ||
| 36 | - @dir=apps; target=all; $(BUILD_ONE_CMD) | ||
| 37 | + +@dir=apps; target=all; $(BUILD_ONE_CMD) | ||
| 38 | build_tests: build_libs | ||
| 39 | - @dir=test; target=all; $(BUILD_ONE_CMD) | ||
| 40 | + +@dir=test; target=all; $(BUILD_ONE_CMD) | ||
| 41 | build_tools: build_libs | ||
| 42 | - @dir=tools; target=all; $(BUILD_ONE_CMD) | ||
| 43 | + +@dir=tools; target=all; $(BUILD_ONE_CMD) | ||
| 44 | |||
| 45 | all_testapps: build_libs build_testapps | ||
| 46 | build_testapps: | ||
| 47 | @@ -565,7 +565,7 @@ install_sw: | ||
| 48 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 49 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 50 | done; | ||
| 51 | - @set -e; target=install; $(RECURSIVE_BUILD_CMD) | ||
| 52 | + +@set -e; target=install; $(RECURSIVE_BUILD_CMD) | ||
| 53 | @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ | ||
| 54 | do \ | ||
| 55 | if [ -f "$$i" ]; then \ | ||
| 56 | diff --git a/Makefile.shared b/Makefile.shared | ||
| 57 | index f6f92e7..43f85fc 100644 | ||
| 58 | --- a/Makefile.shared | ||
| 59 | +++ b/Makefile.shared | ||
| 60 | @@ -105,6 +105,7 @@ LINK_SO= \ | ||
| 61 | SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ | ||
| 62 | LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ | ||
| 63 | LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ | ||
| 64 | + [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \ | ||
| 65 | LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ | ||
| 66 | $${SHAREDCMD} $${SHAREDFLAGS} \ | ||
| 67 | -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ | ||
| 68 | @@ -122,6 +123,7 @@ SYMLINK_SO= \ | ||
| 69 | done; \ | ||
| 70 | fi; \ | ||
| 71 | if [ -n "$$SHLIB_SOVER" ]; then \ | ||
| 72 | + [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \ | ||
| 73 | ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \ | ||
| 74 | ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \ | ||
| 75 | fi; \ | ||
| 76 | diff --git a/crypto/Makefile b/crypto/Makefile | ||
| 77 | index 17a87f8..29c2dcf 100644 | ||
| 78 | --- a/crypto/Makefile | ||
| 79 | +++ b/crypto/Makefile | ||
| 80 | @@ -85,11 +85,11 @@ testapps: | ||
| 15 | @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi | 81 | @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi |
| 16 | 82 | ||
| 17 | subdirs: | 83 | subdirs: |
| @@ -25,7 +91,7 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 25 | 91 | ||
| 26 | links: | 92 | links: |
| 27 | @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) | 93 | @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER) |
| 28 | @@ -100,7 +100,7 @@ | 94 | @@ -100,7 +100,7 @@ links: |
| 29 | # lib: $(LIB): are splitted to avoid end-less loop | 95 | # lib: $(LIB): are splitted to avoid end-less loop |
| 30 | lib: $(LIB) | 96 | lib: $(LIB) |
| 31 | @touch lib | 97 | @touch lib |
| @@ -34,7 +100,7 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 34 | $(AR) $(LIB) $(LIBOBJ) | 100 | $(AR) $(LIB) $(LIBOBJ) |
| 35 | test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o | 101 | test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o |
| 36 | $(RANLIB) $(LIB) || echo Never mind. | 102 | $(RANLIB) $(LIB) || echo Never mind. |
| 37 | @@ -111,7 +111,7 @@ | 103 | @@ -111,7 +111,7 @@ shared: buildinf.h lib subdirs |
| 38 | fi | 104 | fi |
| 39 | 105 | ||
| 40 | libs: | 106 | libs: |
| @@ -43,7 +109,7 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 43 | 109 | ||
| 44 | install: | 110 | install: |
| 45 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | 111 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... |
| 46 | @@ -120,7 +120,7 @@ | 112 | @@ -120,7 +120,7 @@ install: |
| 47 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | 113 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
| 48 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | 114 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ |
| 49 | done; | 115 | done; |
| @@ -52,9 +118,11 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 52 | 118 | ||
| 53 | lint: | 119 | lint: |
| 54 | @target=lint; $(RECURSIVE_MAKE) | 120 | @target=lint; $(RECURSIVE_MAKE) |
| 55 | --- openssl-1.0.2g/engines/Makefile | 121 | diff --git a/engines/Makefile b/engines/Makefile |
| 56 | +++ openssl-1.0.2g/engines/Makefile | 122 | index fe8e9ca..a43d21b 100644 |
| 57 | @@ -72,7 +72,7 @@ | 123 | --- a/engines/Makefile |
| 124 | +++ b/engines/Makefile | ||
| 125 | @@ -72,7 +72,7 @@ top: | ||
| 58 | 126 | ||
| 59 | all: lib subdirs | 127 | all: lib subdirs |
| 60 | 128 | ||
| @@ -63,7 +131,7 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 63 | @if [ -n "$(SHARED_LIBS)" ]; then \ | 131 | @if [ -n "$(SHARED_LIBS)" ]; then \ |
| 64 | set -e; \ | 132 | set -e; \ |
| 65 | for l in $(LIBNAMES); do \ | 133 | for l in $(LIBNAMES); do \ |
| 66 | @@ -89,7 +89,7 @@ | 134 | @@ -89,7 +89,7 @@ lib: $(LIBOBJ) |
| 67 | 135 | ||
| 68 | subdirs: | 136 | subdirs: |
| 69 | echo $(EDIRS) | 137 | echo $(EDIRS) |
| @@ -72,8 +140,8 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 72 | 140 | ||
| 73 | files: | 141 | files: |
| 74 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO | 142 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
| 75 | @@ -128,7 +128,7 @@ | 143 | @@ -128,7 +128,7 @@ install: |
| 76 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \ | 144 | mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \ |
| 77 | done; \ | 145 | done; \ |
| 78 | fi | 146 | fi |
| 79 | - @target=install; $(RECURSIVE_MAKE) | 147 | - @target=install; $(RECURSIVE_MAKE) |
| @@ -81,71 +149,20 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 81 | 149 | ||
| 82 | tags: | 150 | tags: |
| 83 | ctags $(SRC) | 151 | ctags $(SRC) |
| 84 | --- openssl-1.0.2g/Makefile.org | 152 | diff --git a/test/Makefile b/test/Makefile |
| 85 | +++ openssl-1.0.2g/Makefile.org | 153 | index dc1b86f..97eb0de 100644 |
| 86 | @@ -279,17 +279,17 @@ | 154 | --- a/test/Makefile |
| 87 | build_libssl: build_ssl libssl.pc | 155 | +++ b/test/Makefile |
| 88 | 156 | @@ -144,7 +144,7 @@ install: | |
| 89 | build_crypto: | ||
| 90 | - @dir=crypto; target=all; $(BUILD_ONE_CMD) | ||
| 91 | + +@dir=crypto; target=all; $(BUILD_ONE_CMD) | ||
| 92 | build_ssl: build_crypto | ||
| 93 | - @dir=ssl; target=all; $(BUILD_ONE_CMD) | ||
| 94 | + +@dir=ssl; target=all; $(BUILD_ONE_CMD) | ||
| 95 | build_engines: build_crypto | ||
| 96 | - @dir=engines; target=all; $(BUILD_ONE_CMD) | ||
| 97 | + +@dir=engines; target=all; $(BUILD_ONE_CMD) | ||
| 98 | build_apps: build_libs | ||
| 99 | - @dir=apps; target=all; $(BUILD_ONE_CMD) | ||
| 100 | + +@dir=apps; target=all; $(BUILD_ONE_CMD) | ||
| 101 | build_tests: build_libs | ||
| 102 | - @dir=test; target=all; $(BUILD_ONE_CMD) | ||
| 103 | + +@dir=test; target=all; $(BUILD_ONE_CMD) | ||
| 104 | build_tools: build_libs | ||
| 105 | - @dir=tools; target=all; $(BUILD_ONE_CMD) | ||
| 106 | + +@dir=tools; target=all; $(BUILD_ONE_CMD) | ||
| 107 | |||
| 108 | all_testapps: build_libs build_testapps | ||
| 109 | build_testapps: | ||
| 110 | @@ -544,7 +544,7 @@ | ||
| 111 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 112 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 113 | done; | ||
| 114 | - @set -e; target=install; $(RECURSIVE_BUILD_CMD) | ||
| 115 | + +@set -e; target=install; $(RECURSIVE_BUILD_CMD) | ||
| 116 | @set -e; liblist="$(LIBS)"; for i in $$liblist ;\ | ||
| 117 | do \ | ||
| 118 | if [ -f "$$i" ]; then \ | ||
| 119 | --- openssl-1.0.2g/Makefile.shared | ||
| 120 | +++ openssl-1.0.2g/Makefile.shared | ||
| 121 | @@ -105,6 +105,7 @@ | ||
| 122 | SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ | ||
| 123 | LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ | ||
| 124 | LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ | ||
| 125 | + [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \ | ||
| 126 | LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ | ||
| 127 | $${SHAREDCMD} $${SHAREDFLAGS} \ | ||
| 128 | -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \ | ||
| 129 | @@ -122,6 +123,7 @@ | ||
| 130 | done; \ | ||
| 131 | fi; \ | ||
| 132 | if [ -n "$$SHLIB_SOVER" ]; then \ | ||
| 133 | + [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \ | ||
| 134 | ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \ | ||
| 135 | ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \ | ||
| 136 | fi; \ | ||
| 137 | --- openssl-1.0.2g/test/Makefile | ||
| 138 | +++ openssl-1.0.2g/test/Makefile | ||
| 139 | @@ -144,7 +144,7 @@ | ||
| 140 | tags: | 157 | tags: |
| 141 | ctags $(SRC) | 158 | ctags $(SRC) |
| 142 | 159 | ||
| 143 | -tests: exe apps $(TESTS) | 160 | -tests: exe apps $(TESTS) |
| 144 | +tests: exe $(TESTS) | 161 | +tests: exe $(TESTS) |
| 145 | 162 | ||
| 146 | apps: | 163 | apps: |
| 147 | @(cd ..; $(MAKE) DIRS=apps all) | 164 | @(cd ..; $(MAKE) DIRS=apps all) |
| 148 | @@ -438,136 +438,136 @@ | 165 | @@ -438,136 +438,136 @@ BUILD_CMD_STATIC=shlib_target=; \ |
| 149 | link_app.$${shlib_target} | 166 | link_app.$${shlib_target} |
| 150 | 167 | ||
| 151 | $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) | 168 | $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO) |
| @@ -326,7 +343,7 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 326 | 343 | ||
| 327 | #$(AESTEST).o: $(AESTEST).c | 344 | #$(AESTEST).o: $(AESTEST).c |
| 328 | # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c | 345 | # $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c |
| 329 | @@ -580,6 +580,6 @@ | 346 | @@ -580,7 +580,7 @@ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssltestlib.o $(DLIBSSL) $(DLIBCRYPTO) |
| 330 | # fi | 347 | # fi |
| 331 | 348 | ||
| 332 | dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) | 349 | dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO) |
| @@ -334,4 +351,7 @@ Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | |||
| 334 | + +@target=dummytest; $(BUILD_CMD) | 351 | + +@target=dummytest; $(BUILD_CMD) |
| 335 | 352 | ||
| 336 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 353 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 337 | \ No newline at end of file | 354 | |
| 355 | -- | ||
| 356 | 2.7.4 | ||
| 357 | |||
