Skip to contentSkip to conversation

openssl: parallel build

PATCH Superseded Ryan Barnett 2 participants 5 messages Sep 16, 2015

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover openssl: parallel build

I have adopted Thomas P's patches that we submitted but in May in order enable parallel build of openssl. I have updated the patches to use the latest patches available from gentoo and have tested builds only on i386, ARM, and MIPS.

Original Patches:

http://patchwork.ozlabs.org/patch/473086/
http://patchwork.ozlabs.org/patch/473087/

Ryan Barnett (2):
openssl: use git formatted patches
openssl: enable parallel build and installation

 ...time-building-manpages-if-we-re-not-going.patch | 27 ++++++++
 ...odev-Fix-issue-with-signature-generation.patch} | 71 +++++++++++++---------
 package/openssl/001-do-not-build-docs.patch        | 13 ----
 package/openssl/openssl.hash                       |  2 +
 package/openssl/openssl.mk                         | 12 ++--
 5 files changed, 78 insertions(+), 47 deletions(-)
 create mode 100644 package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch
 rename package/openssl/{003-cryptodev-Fix-issue-with-signature-generation.patch => 0002-cryptodev-Fix-issue-with-signature-generation.patch} (82%)
 delete mode 100644 package/openssl/001-do-not-build-docs.patch
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 openssl: use git formatted patches

Using Git formatted patches makes it easier to adjust the patches when needed.

CC Thomas Petazzoni <[email protected]>
CC Gustavo Zacarias <[email protected]>
CC Arnout Vandecappelle <[email protected]>

---
Changes v1 to v2:
- Move changes from patch 2/2 to here (suggested by Arnout)
- Note: git automatically detects a delete and new file for patch 001 to 0001. So there is no rename since the changes to the file are greater than 50%.

---
 ...time-building-manpages-if-we-re-not-going.patch | 27 ++++++++
 ...odev-Fix-issue-with-signature-generation.patch} | 71 +++++++++++++---------
 package/openssl/001-do-not-build-docs.patch        | 13 ----
 3 files changed, 69 insertions(+), 42 deletions(-)
 create mode 100644 package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch
 rename package/openssl/{003-cryptodev-Fix-issue-with-signature-generation.patch => 0002-cryptodev-Fix-issue-with-signature-generation.patch} (82%)
 delete mode 100644 package/openssl/001-do-not-build-docs.patch
package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch new file +27 -0
new file mode 100644
index 0000000..f705863
@@ -0,0 +1,27 @@
+From e76a75ad2d420ff070db18cfe49c508011b11afd Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <[email protected]>
+Date: Sat, 16 May 2015 18:53:51 +0200
+Subject: [1/2] Dont waste time building manpages if we're not going to use em.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Signed-off-by: Ryan Barnett <[email protected]>
+---
+ Makefile.org | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.org b/Makefile.org
+index 60f07cc..976ceaf 100644
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -527,7 +527,7 @@ dist:
+ dist_pem_h:
+ 	(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
+ 
+-install: all install_docs install_sw
++install: all install_sw
+ 
+ install_sw:
+ 	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
+-- 
+1.9.1
+
package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch renamed from package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch +42 -29

234 lines not on this page · raw message

package/openssl/001-do-not-build-docs.patch deleted +0 -13
deleted file mode 100644
index 135a9d3..0000000
@@ -1,13 +0,0 @@
-Dont waste time building manpages if we're not going to use em.
-
---- openssl/Makefile.org
-+++ openssl/Makefile.org
-@@ -792,7 +792,7 @@
- dist_pem_h:
- 	(cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
- 
--install: all install_docs install_sw
-+install: all install_sw
- 
- install_sw:
- 	@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 1/2 openssl: use git formatted patches

Hi Ryan,

Quoted 7 lines · Ryan Barnett

Using Git formatted patches makes it easier to adjust the patches when needed.

CC Thomas Petazzoni <[email protected]>
CC Gustavo Zacarias <[email protected]>
CC Arnout Vandecappelle <[email protected]>

[...]

Quoted 10 lines
package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch renamed from package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch +2 -0
similarity index 82%
rename from package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch
rename to package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch
index 19ed5e7..c5d05a5 100644
@@ -1,14 +1,24 @@
+From 16f5e2a8ec5909f94a91a87046cbed091ee880e1 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>

package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch line 7

Quoted 10 lines
package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch renamed from package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch +3 -1
+Date: Sat, 16 May 2015 18:55:08 +0200
+Subject: [2/2] cryptodev: Fix issue with signature generation
+
 Forward port of 0001-cryptodev-Fix-issue-with-signature-generation.patch
 from http://rt.openssl.org/Ticket/Display.html?id=2770&user=guest&pass=guest
 It was originally targetted at 1.0.2-beta3.
 
 Without this patch digest acceleration via cryptodev is broken.
 
-Signed-off-by: Gustavo Zacarias <[email protected]>

Why do you remove Gustavo's signoff?

package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch line 16

Quoted 5 lines
package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch renamed from package/openssl/003-cryptodev-Fix-issue-with-signature-generation.patch +5 -0
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Signed-off-by: Ryan Barnett <[email protected]>
+---
+ crypto/engine/eng_cryptodev.c | 195 +++++++++++++++++++++++++++++++-----------
+ 1 file changed, 146 insertions(+), 49 deletions(-)

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH v2 1/2 openssl: use git formatted patches

Baurch,

Quoted 2 lines · Baruch Siach

Hi Ryan,

[..]

Quoted 5 lines
Quoted 3 lines

Without this patch digest acceleration via cryptodev is broken.

-Signed-off-by: Gustavo Zacarias <[email protected]>

Why do you remove Gustavo's signoff?

Didn't mean do just missed that line when importing the patch into git to format the patch.

I will send a v3 of the patches.

Thanks,
-Ryan

#4 lore raw

PATCH v2 2/2 openssl: enable parallel build and installation

In reply to Ryan Barnett

This is a patch that is originally based on a patch Thomas P. submitted for an earlier version of this package. I have adopted this patch to use the latest available Gentoo parallel patch. I have also seen about a minute improvement on my build times of openssl.

Part of Thomas P's original message:

On my build server, the current build of OpenSSL takes 1 minutes and 20 seconds. With this commit applied, enabling parallel build and installation, the build only takes 28 seconds.

All the patches are downloaded from Gentoo.

There is apparently some interest in upstream OpenSSL to enable
parallel build, see for example commit
https://github.com/openssl/openssl/commit/c3f22253b139793ff3b91ff7e6969e180cf06815. This commit is not part of any OpenSSL release, but we can hope that the problem will resolved in the future.

CC Thomas Petazzoni <[email protected]>
CC Gustavo Zacarias <[email protected]>
CC Arnout Vandecappelle <[email protected]>

---
Changes from v1 to v2:
- Removed changes to existing patches in openssl (suggested by Arnout)
- Updated parallel patch URL to use Gentoo gitweb (suggested by Mike)

---
 package/openssl/openssl.hash |  2 ++
 package/openssl/openssl.mk   | 12 +++++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)
package/openssl/openssl.hash +2 -0
index 355be79..9eaa363 100644
@@ -1,2 +1,4 @@
 # From https://www.openssl.org/source/openssl-1.0.2d.tar.gz.sha256
 sha256	671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8	openssl-1.0.2d.tar.gz
+# Locally computed
+sha256	deaf6f3af41874ecc6d63841ea14b8e6c71cea81d4a511a754bc90c9a993147f	openssl-1.0.2d-parallel-build.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d
package/openssl/openssl.mk +7 -5
index 3d87919..c1fc420 100644
@@ -13,6 +13,8 @@ OPENSSL_DEPENDENCIES = zlib
 HOST_OPENSSL_DEPENDENCIES = host-zlib
 OPENSSL_TARGET_ARCH = generic32
 OPENSSL_CFLAGS = $(TARGET_CFLAGS)
+OPENSSL_PATCH = \
+	https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2d-parallel-build.patch?id=56bd759df1d0c750a065b8c845e93d5dfa6b549d
 
 ifeq ($(BR2_USE_MMU),)
 OPENSSL_CFLAGS += -DHAVE_FORK=0
@@ -99,23 +101,23 @@ OPENSSL_POST_CONFIGURE_HOOKS += OPENSSL_FIXUP_STATIC_MAKEFILE
 endif
 
 define HOST_OPENSSL_BUILD_CMDS
-	$(MAKE1) -C $(@D)
+	$(MAKE) -C $(@D)
 endef
 
 define OPENSSL_BUILD_CMDS
-	$(MAKE1) -C $(@D)
+	$(MAKE) -C $(@D)
 endef
 
 define OPENSSL_INSTALL_STAGING_CMDS
-	$(MAKE1) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
+	$(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install
 endef
 
 define HOST_OPENSSL_INSTALL_CMDS
-	$(MAKE1) -C $(@D) install
+	$(MAKE) -C $(@D) install
 endef
 
 define OPENSSL_INSTALL_TARGET_CMDS
-	$(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
+	$(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
 	rm -rf $(TARGET_DIR)/usr/lib/ssl
 	rm -f $(TARGET_DIR)/usr/bin/c_rehash
 endef
Signature · 1 line
1.9.1