From patchwork Wed Sep 16 12:06:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 518373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id B14DE14016A for ; Wed, 16 Sep 2015 22:06:46 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=LQYWGnZM; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CE10B9236C; Wed, 16 Sep 2015 12:06:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cgMRnqtBv1E6; Wed, 16 Sep 2015 12:06:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B989492366; Wed, 16 Sep 2015 12:06:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id ED59F1C11A0 for ; Wed, 16 Sep 2015 12:06:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E7CA932C8E for ; Wed, 16 Sep 2015 12:06:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32oRBwR9ZrOr for ; Wed, 16 Sep 2015 12:06:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.177]) by silver.osuosl.org (Postfix) with ESMTPS id D460A32C74 for ; Wed, 16 Sep 2015 12:06:34 +0000 (UTC) Received: by iofb144 with SMTP id b144so228921401iof.1 for ; Wed, 16 Sep 2015 05:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZOICvjBfEHvVtHhpyhM/C8Xs6bmmNemCTFcQRQP+HCU=; b=LQYWGnZMqAXp5GIJ8YYNucawC5HT6UP3UZuSNM8mfVdE1bsGh/ZlFptw4cntkGKgXA qcdjdIWX1E4LP7RSrTpDx9LA4OtOsI9fppAxnkIdxSF1yzFp+onT1w+iZX/UHMQvgtc5 mqnLfa6lo9B+7LivHJ5IFqrT2yNur7zMG6aWhfvLejpaPZotDJ7zN/FK+cY0sJqTAWXr pQfBsuFQOOule0yaEjyABqNz24Awr6ug4/6mn0GKLFOfrth/Oq+0GExhFy+4JQPyO5FC OZbbDW55Pn1VbzJ38eF0tI5m8Wp2Stkr6nI4n9BApwieh4P6o4RFKi+SYGJ6hk6sEejP 4xNw== X-Received: by 10.107.160.82 with SMTP id j79mr43656434ioe.18.1442405194269; Wed, 16 Sep 2015 05:06:34 -0700 (PDT) Received: from ryan-ubuntu.barnett.net (50-83-61-125.client.mchsi.com. [50.83.61.125]) by smtp.gmail.com with ESMTPSA id c97sm10193704ioj.41.2015.09.16.05.06.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Sep 2015 05:06:33 -0700 (PDT) From: Ryan Barnett To: buildroot@buildroot.org Date: Wed, 16 Sep 2015 07:06:25 -0500 Message-Id: <1442405185-4103-3-git-send-email-ryanbarnett3@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442405185-4103-1-git-send-email-ryanbarnett3@gmail.com> References: <1442405185-4103-1-git-send-email-ryanbarnett3@gmail.com> Cc: Thomas Petazzoni Subject: [Buildroot] [v3 2/2] openssl: enable parallel build and installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. Signed-off-by: Ryan Barnett CC: Thomas Petazzoni CC: Gustavo Zacarias CC: Arnout Vandecappelle --- Changes from v2 to v3: - No changes 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) Signed-off-by: Ryan Barnett --- package/openssl/openssl.hash | 2 ++ package/openssl/openssl.mk | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/package/openssl/openssl.hash b/package/openssl/openssl.hash index 355be79..9eaa363 100644 --- a/package/openssl/openssl.hash +++ b/package/openssl/openssl.hash @@ -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 diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk index 3d87919..c1fc420 100644 --- a/package/openssl/openssl.mk +++ b/package/openssl/openssl.mk @@ -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